ldap/servers/slapd/back-ldbm/ldbm_add.c | 5 +++++ 1 file changed, 5 insertions(+)
New commits: commit fe81bda5f2f2cef647cedadf9ba442f8b7851973 Author: Mark Reynolds mreynolds@redhat.com Date: Tue Jun 17 17:23:07 2014 -0400
Ticket 47815 - Add operations rejected by betxn plugins remain in cache
Bug Description: When an add operation is rejected by a betxn post plugin the "adding" entry is removed the cache(previously added tentatively), it gets re-added back to the entry cache when we call betxn post plugins just before the abort.
Fix Description: Remove the entry from the cache when the 2nd run of the betxn postop plugins fails(just before we abort the transaction).
https://fedorahosted.org/389/ticket/47815
valgrind: passed jenkins: passed
Reviewed by: nhosoi(Thanks!)
diff --git a/ldap/servers/slapd/back-ldbm/ldbm_add.c b/ldap/servers/slapd/back-ldbm/ldbm_add.c index 5be1cd8..181c173 100644 --- a/ldap/servers/slapd/back-ldbm/ldbm_add.c +++ b/ldap/servers/slapd/back-ldbm/ldbm_add.c @@ -1222,6 +1222,11 @@ diskfull_return: opreturn = -1; slapi_pblock_set(pb, SLAPI_PLUGIN_OPRETURN, &opreturn); } + if (addingentry_in_cache && addingentry && inst) { + CACHE_REMOVE(&inst->inst_cache, addingentry); + /* tell frontend not to free this entry */ + slapi_pblock_set(pb, SLAPI_ADD_ENTRY, NULL); + } }
/* Release SERIAL LOCK */
389-commits@lists.fedoraproject.org