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

Re: Issues with syncrepl and mirrormode



Pierangelo Masarati wrote:
Pierangelo Masarati wrote:
Mi first question is: is "rid=004,sid=000,csn=" a legitimate cookie?
As far as our implementation goes, no. slap_compose_sync_cookie() should
never
produce this.
I could reproduce it, but unfortunately I don't have much info available.
I have instrumented syncprov.c to log the cookie any time it is prepared,
and the incorrect cookie was generated by slap_compose_sync_cookie() when
invoked by syncprov_sendresp() after a successful add.  I only saw the
log, so I couldn't inspect memory during that operation, so I'm trying to
narrow things down to a small and quickly reproducible example.
Apparently, opc->sctxcsn contains an empty berval, otherwise no "csn="
portion would apprear in the cookie.

I note that in syncprov_op_response(), if slap_get_commit_csn() can't get a maxcsn, opc->sctxcsn would be set to an empty berval, and this would trigger the above cookie. I wonder if this is possible at all, and if setting opc->sctxcsn to a NULL berval would just cure the problem.

I think that will just mask the problem. If you're in an Add operation, there must be a CSN already. So perhaps we should assert() in slap_get_commit_csn and find out why it returned without one.
--
-- Howard Chu
Chief Architect, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/