Wednesday, June 18, 2014

[389-commits] Branch '389-ds-base-1.3.1' - ldap/servers

ldap/servers/slapd/back-ldbm/ldbm_add.c | 5 +++++
1 file changed, 5 insertions(+)

New commits:
commit 98b0853fe4f566cd213415ef6dbc6f9641dda050
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!)

(cherry picked from commit fe81bda5f2f2cef647cedadf9ba442f8b7851973)

diff --git a/ldap/servers/slapd/back-ldbm/ldbm_add.c b/ldap/servers/slapd/back-ldbm/ldbm_add.c
index 2b79be3..fb487cc 100644
--- a/ldap/servers/slapd/back-ldbm/ldbm_add.c
+++ b/ldap/servers/slapd/back-ldbm/ldbm_add.c
@@ -1220,6 +1220,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 mailing list
389-commits@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/389-commits

No comments:

Post a Comment