[python-ldap] Need to detect if syncrepl refresh phase is completed
Michael Ströder
michael at stroeder.com
Fri Sep 26 09:05:00 CEST 2014
Chris Mikkelson wrote:
> On Thu, Sep 25, 2014 at 10:27:26PM +0200, Michael Strder wrote:
>> (restored former subject)
>>
>> Chris Mikkelson wrote:
>>> 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.
>
> Indeed, but for more than just this reason. [..]
Yes.
> Fixing this would not just require tracking state on
> a per-msgid basis internally, but also exposing the
> msgid in syncrepl_setcookie() and syncrepl_getcookie().
> I'm not sure this would be worth the complication for
> most use cases.
>
> I think even OpenLDAP manages multiple connections in this
> case.
At least it should be clearly documented somewhere.
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/20140926/6aa89206/attachment-0001.bin>
More information about the python-ldap
mailing list