andykimpe / rpms / 389-ds-base

Forked from rpms/389-ds-base 5 months ago
Clone
dc8c34
From 9186307df2d5c93aeadf54908fbd520f1f309467 Mon Sep 17 00:00:00 2001
dc8c34
From: Noriko Hosoi <nhosoi@redhat.com>
dc8c34
Date: Tue, 1 Jul 2014 14:07:01 -0700
dc8c34
Subject: [PATCH 234/234] Ticket #47750 - Creating a glue fails if one above
dc8c34
 level is a conflict or missing
dc8c34
dc8c34
Description: This commit accidentally removed the code to add entry
dc8c34
back to cache if it was replaced:
dc8c34
  Commit: 160cb3f686e433c01532d28770b2977ec957e73e
dc8c34
  Ticket #47750 - Creating a glue fails if one above level is a conflict or missing;
dc8c34
Thanks to lkrispen@redhat.com for figuring it out.
dc8c34
dc8c34
Note: This is the cause of Ticket #47830 - usn tombstone entry not properly created
dc8c34
(cherry picked from commit 98cf4246b6e5c8a99a1e9063eca9aad9560185bd)
dc8c34
(cherry picked from commit 8c496b1e3b9d8a23369573423cb0b22bc6ed0e2d)
dc8c34
(cherry picked from commit 51a76a4d565f0e93092e589ee7e3064d5371c54a)
dc8c34
(cherry picked from commit 5b76c176de2ac09f17cf97e74800a38307b789f7)
dc8c34
---
dc8c34
 ldap/servers/slapd/back-ldbm/ldbm_delete.c | 7 +++++++
dc8c34
 1 file changed, 7 insertions(+)
dc8c34
dc8c34
diff --git a/ldap/servers/slapd/back-ldbm/ldbm_delete.c b/ldap/servers/slapd/back-ldbm/ldbm_delete.c
dc8c34
index 1d2cbc3..ece8f0f 100644
dc8c34
--- a/ldap/servers/slapd/back-ldbm/ldbm_delete.c
dc8c34
+++ b/ldap/servers/slapd/back-ldbm/ldbm_delete.c
dc8c34
@@ -548,6 +548,11 @@ ldbm_back_delete( Slapi_PBlock *pb )
dc8c34
 					goto error_return;
dc8c34
 				}
dc8c34
 			}
dc8c34
+			/* reset original entry in cache */ 
dc8c34
+			if (!e_in_cache) { 
dc8c34
+				CACHE_ADD(&inst->inst_cache, e, NULL); 
dc8c34
+				e_in_cache = 1; 
dc8c34
+			} 
dc8c34
 			if (ruv_c_init) {
dc8c34
 				/* reset the ruv txn stuff */
dc8c34
 				modify_term(&ruv_c, be);
dc8c34
@@ -675,6 +680,8 @@ ldbm_back_delete( Slapi_PBlock *pb )
dc8c34
 					retval= -1;
dc8c34
 					DEL_SET_ERROR(ldap_result_code, LDAP_OPERATIONS_ERROR, retry_count);
dc8c34
 					goto error_return;
dc8c34
+				} else {
dc8c34
+					e_in_cache = 0;
dc8c34
 				}
dc8c34
 			} else {
dc8c34
 				struct backentry *imposter = NULL;
dc8c34
-- 
dc8c34
1.8.1.4
dc8c34