Ticket #382 - DS Shuts down intermittently
https://fedorahosted.org/389/ticket/382
Resolves: Ticket #382
Bug Description: DS Shuts down intermittently
Reviewed by: nhosoi (Thanks!)
Branch: 389-ds-base-1.2.10
Fix Description: The usn code called from ldbm_back_delete was adding
entryusn and preventryusn to the entry directly in the cache. If another
thread was accessing the entry (e.g. an internal search done by referint or
memberof, or an external search) at the same time, the server would crash.
The fix is to not modify the cached entry directly - instead, modify a
copy of the entry, and apply the entryusn set in the copy to the tombstone.
Then we don't need to use SLAPI_DELETE_BEPREOP_ENTRY or
SLAPI_DELETE_BEPOSTOP_ENTRY at all. We don't need to clean up the
postentry - we are not setting entryusn or preventryusn in the real entry -
we are setting those values in the tombstone entry - if successful, the
values will be added or deleted accordingly - if not successful, the
values are thrown away and freed.
Platforms tested: RHEL6 x86_64
Flag Day: no
Doc impact: no