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

(ITS#5954) deleting one of several syncrepl consumers deletes the wrong one

Full_Name: Jonathan Clarke
Version: RE24
OS: CentOS
URL: http://milopita.phillipoux.net/jonathan-clarke-090217.patch
Submission from: (NULL) (

Hi all,

It seems that when adding syncrepl consumers to be->be_syncinfo, they are added
in LIFO order. However, when deleting the nth syncrepl consumer via a ldapdelete
on cn=config from be->be_syncinfo, the nth entry in the list is removed, which
is not the same one.

To reproduce:
1) If we start with this in cn=config:
> olcSyncRepl: {0}rid=001
> olcSyncRepl: {1}rid=002

The list order is (schematically):
be->be_syncinfo = {rid=002, rid=001}

2) Add add a rid=003, we have in cn=config:
olcSyncRepl: {0}rid=001
olcSyncRepl: {1}rid=002
olcSyncRepl: {2}rid=003

and the list is:
be->be_syncinfo = {rid=003, rid=002, rid=001}

3) We attempt to delete rid=003:
dn: ...,cn=config
changeType: modify
delete: olcSyncRepl
olcSyncRepl: {2}rid=003

The list then contains, value number 2 having been deleted:
be->be_syncinfo = {rid=003, rid=002}

The above patch changes the order syncrepl info is inserted in the list. This
corrects the problem, and I have not seen any other consequences (by running the
test suite and browsing the code).

Is this OK? My apologies if I have missed something big here.