[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: Question about contextCSN's



Rein Tollevik wrote:
> Ryan Steele wrote:
>> I'm replicating both the config and backend databases between two
>> boxes.  Everything seems fine, but for some reason
>> when I query them both for the contextCSN, the config database returns
>> only one while the backend database returns two,
>> as seen below:
> 
> The contextCSN attribute with any given sid is added to a database only
> after the server with that serverID modifies the database.  The count of
> contextCSN values in a database does not need to reflect the number of
> master servers that could modify it, and it have no relation to the
> values in other databases.
> 
> In your example, all modifications to cn=config was probably made on the
> first server (assuming it have serverID 1 that is).  The example db have
> been modified by both.
> 
> Rein

Thanks a lot for clarifying; I didn't realize that the contextCSN for each SID was added to a given database only after
being modified by that SID.  And yes, I do understand that the different databases (e.g., backend and config) will have
different contextCSN's reflecting the last time they were written to, but my question was mostly about the same database
on different nodes.  Namely, I thought that verifying whether replication was complete was done by comparing the
contextCSN's for the same database on each node (SID) in the replication group.  That is, if replication is working,
each server to whom the given database is being replicated should have the same contextCSN for that database, to verify
that each received the same last write operation.

I'm not quite sure how to interpret that though, given the results I'm seeing in my master-master pair.  Should the
contextCSN's in the backend database for both SID 001 and SID 002 match?  E.g.:

contextCSN: 20100126210305.876171Z#000000#001#000000
contextCSN: 20100126210305.876171Z#000000#002#000000

Or should both nodes agree about the timestamps for each SID independently?  E.g.:

### ldap1
contextCSN: 20100126210305.876171Z#000000#001#000000
contextCSN: 20091018205321.288716Z#000000#002#000000

### ldap2
contextCSN: 20100126210305.876171Z#000000#001#000000
contextCSN: 20091018205321.288716Z#000000#002#000000


It would intuitively seem to me that each node (SID) to whom the database is being replicated should have the same
contextCSN, so that one could verify the replication status by looking at the attribute values for each SID on one node,
instead of querying each node to see if the timestamp for each individual SID matched on every node.  But, which is
correct?  Thanks again for the insight.

Respectfully,
Ryan