Rein Tollevik wrote:
Syncrepl should never be propagating contextCSN updates whose SID matches the current serverID. By definition, only the current server should ever be generating changes with the current serverID.
Updates to "foreign" contextCSN values (i.e those with a SID not matching the current non-zero serverID) should be imported into the set of contextCSN values syncprov itself maintain. Syncprov could also short-circuit the contextCSN update and delay it to its own checkpoint. I'm not sure what effect the checkpoint feature have today when syncrepl constantly updates the contextCSN..
The checkpoint probably only made sense for single-master.
OK, any point in making it work again? It shouldn't be that hard..
Syncprov must, when syncrepl updates the contextCSN in the suffix of a subordinate DB, update its own knowledge of the "foreign" CSNs to be the *lowest* CSN with any given SID stored in all the subordinate DBs (where syncrepl is configured). And no update must take place unless a contextCSN value have been stored in *all* the syncrepl-enabled subordinate DBs. Any values matching the current non-zero serverID should be updated in this case too, but a new value should probably not be inserted.
Every source of updates to a DB must use its own unique SID. There should not be a lowest/highest foreign CSN to choose; there should only be one per SID. And as already noted, no syncrepl should ever be sending in a contextCSN update for the current serverID, those can only come from clients directly writing the local DB.
Rein