[python-ldap] Need to detect if syncrepl refresh phase is completed
Michael Ströder
michael at stroeder.com
Thu Sep 25 22:27:26 CEST 2014
(restored former subject)
Chris Mikkelson wrote:
> FWIW, I've detected the end of refresh by watching for the first
> syncrepl_set_cookie() call. I do not know if this heuristic relies
> on OpenLDAP's implementation, but in order for this not to work, the
> server would have to make the rather odd choice to send a cookie
> along with an entry in the middle of the refresh phase.
>
> A separate method is a cleaner approach, though.
>
> It should suffice (and address the style nits) to replace
> the two current occurrences of:
>
> self.__refreshDone = sim.refreshDelete['refreshDone']
>
> with:
> if sim.refreshDelete['refreshDone']:
> self.__refreshDone = True
> self.syncrepl_refreshdone()
>
> Patch attached.
This would have been also my naive approach.
But this make me wonder about an limitation of the current implementation:
In theory a syncrepl client could initiate several syncrepl searches with
different search parameters on the same LDAP connection. AFAICS this would not
work with current class SyncReplConsumer.
Ciao, Michael.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4252 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://mail.python.org/pipermail/python-ldap/attachments/20140925/c65656e2/attachment.bin>
More information about the python-ldap
mailing list