Re: NEXTID value incremented improperly

Mark Smith (
Wed, 07 Aug 1996 15:10:06 -0700

Jim Doyle wrote:
> I am using slapd from the 3.3 release, without any patches.
> When performing a bulk-add of improperly formatted entries using
> LDAP add, NEXTID is incremented for each entry that is attempted
> even though the data is NEVER committed to the ldbm backing store.

A glance through ldap-3.3/servers/slapd/back-ldbm/add.c makes me think
that NEXTID should not be incremented in this case. The internal
li->li_nextid counter maintained by the LDBM back-end is decremented if
no other add operations have been initiated between starting an add and
finding out that the add can't succeed.

Are you by chance adding entries without waiting for the result(s) from
earlier add operations to come back? If so, that would explain the
behvaior you see. The good news is that extra incrementing of NEXTID is
not harmful. It is only essential that new entries by added with some
id that is higher than all previously added entries.