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

Re: Issues with syncrepl and mirrormode

>> 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.


Ing. Pierangelo Masarati
OpenLDAP Core Team

SysNet s.r.l.
via Dossi, 8 - 27100 Pavia - ITALIA
Office:  +39 02 23998309
Mobile:  +39 333 4963172
Email:   pierangelo.masarati@sys-net.it