cancel
Showing results for 
Search instead for 
Did you mean: 

Replication - race conditions

UnboundID tamAtping
UnboundID
0 Kudos

Replication - race conditions

Hi all,

 

I'm with a customer at the moment, and they have asked what happens where we have 2 write directories, and the same create request was processed on both write servers, with no time differential.

 

What is the default behavior, and what are the options?

 

 

Thanks,

Tam

1 REPLY
UnboundID davidely
UnboundID
0 Kudos

Re: Replication - race conditions

The Replication Conflicts section of the admin guide covers this case and a
lot more. I'll try to summarize it for your specific question.

If the two entries that were added are identical (e.g., the client retried
the operation at a different server), then there's no conflict and you just
end up with one entry. If the two entries are different, then the one that
was added first will win (more on how this is determined in the next
paragraph). The server will generate an administrative alert since there
was a conflict that it could not resolve automatically. The newer entry
will be renamed and hidden. It will only be returned on a search if you ask
for it directly or if you include (objectclass=ds-sync-conflict-entry) in
your search filter. The "dsreplication status" command has a column that
reports the number of these conflict entries. See the "To Fix a Naming
Conflict" section for more information on this.

Every change that happens in the server includes a unique Change Sequence
Number (CSN) that is used to order changes. This includes a three
components. There is a time stamp, a sequence number, and a server ID. In
the unlikely event that the add operations happened at the same millisecond
on both servers, then it will fall back to compare the sequence number, and
if that is the same, it will use the server ID.

David