hyc@symas.com wrote:
Rein Tollevik wrote:
My thought was that with serverID=0 reserved for the true single-master configuration and tool mode we could safely ignore a contextCSN with 0 in the sid field when serverID>0 is in use (to get rid of values already in the databases). At startup syncprov could update its own contextCSN value with newer entryCSN values that has 0 in the sid field. Ref ITS#5537. Slapadd'ing on more than one master without synchronizing them between each run could still be a potential problem though..
That's not a viable solution.
The syncprov startup check is primarily to recover from unclean shutdowns. I.e., it's looking for newer CSNs that may have been saved before syncprov got a chance to write its final checkpoint. Ignoring values, or giving special treatment to sid 0 isn't going to work for that purpose.
Hm, have to think about this some more.
Generally, slapadd/slapindex require the directory to be offline. As such, if you have any running servers, you should be adding entries using ldapadd, not slapadd. So I'm going to ignore this case for now.