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

Re: delta syncrepl error: "text=sync cookie is stale"

* Quanah Gibson-Mount <quanah@stanford.edu> [20060503 18:23]:
> --On Wednesday, May 03, 2006 4:37 PM -0700 Ben Poliakoff <benp@reed.edu> 
> wrote:
> >I haven't found a lot of discussion about troubleshooting delta syncrepl
> >configurations.  Where do I start?  What causes a cookie to get "stale"?
> Well, the first thing I would do is get the necessary patches to 2.3.21 for 
> delta-syncrepl to work correctly (There are problems with the access log 
> overlay, and with the fine-grainedndess of indexing reqStart).  You can 
> find them at:
> <http://www.stanford.edu/services/directory/openldap/configuration/openldap-build.html>

Thanks for the pointer to these patches.  I'll add them to my next

> However, I think the problem you are reporting will not be fixed by these 
> particular patches.  They certainly will, however, make delta-syncrepl 
> function like it is supposed to for other cases.
> I've not tested having delta-syncrepl pull down an entire DB and then run.
> Some things to check are:
> contextCSN of the master (ldapsearch -b "your base" -s base +)
> contextCSN of accesslog:
> contextCSN of the replica:

Somehow the contextCSN of my accesslog wasn't in sync with the
contextCSN of my primary db on master or my replica; master and replica
agreed on the contextCSN for the primary db, but the contextCSN for
the accesslog on my master was off.  This explains the symptoms I was
seeing: I could sync the entire primary db to my slave, but trouble
ensued once the slave started to look at the accesslog (due to the
conflicting contextCSNs).

Once I got the contextCSNs in sync (by making a trivial modification to
an entry in my primary db) things got a lot happier.  I need to figure
out how I managed to get the contextCSNs out of sync in the first place.

Thanks again for your help, it was right on the mark.  

And once again as someone new to syncrepl and delta syncrepl, I just
have to saw "Wow!".  Delta syncrepl is *very* cool both in design and in
practice.  Updates to slaves are exceedingly fast.  Thanks to all the
devs and bug reporters for bringing OpenLDAP to where it is today.