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

Mark Reynolds mreynolds at fedoraproject.org
Wed Jun 18 12:27:07 UTC 2014


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

New commits:
commit 887a72ef6f2cacdf256e340cb79732df0b220adb
Author: Mark Reynolds <mreynolds at 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 c99db8d..0dcb158 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 */




More information about the 389-commits mailing list