Blame SOURCES/0071-Ticket-47976-deadlock-in-mep-delete-post-op.patch

246821
From 34239335f2658905a2f96865bea0503bb6ad5ec1 Mon Sep 17 00:00:00 2001
246821
From: Thierry Bordaz <tbordaz@redhat.com>
246821
Date: Tue, 3 Nov 2015 15:59:54 +0100
246821
Subject: [PATCH 71/75] Ticket 47976: deadlock in mep delete post op
246821
246821
Bug Description:
246821
	When deleting the original entry, some DB pages are acquired in write.
246821
	The deadlock occurs because when reading the parent entry of the MEP entry
246821
	MEP plugin requires read access to one of the page acquired by the deletion of the original entry.
246821
        The read access can be granted if it is using the parent txn.
246821
	This bug requires that the parent entry of the MEP entry is not found in the entry cache, so
246821
	it requires database access
246821
246821
Fix Description:
246821
	Fix ldbm_delete, so that it reads id2entry db with parent txn
246821
246821
https://fedorahosted.org/389/ticket/47976
246821
246821
Reviewed by: Ludwig Krispenz, Rich Megginson (Thanks you !!)
246821
246821
Platforms tested: F17
246821
246821
Flag Day: no
246821
246821
Doc impact: no
246821
246821
(cherry picked from commit 55434d308b4e459ba3a169eff94568312dba767c)
246821
---
246821
 ldap/servers/slapd/back-ldbm/ldbm_delete.c | 2 +-
246821
 1 file changed, 1 insertion(+), 1 deletion(-)
246821
246821
diff --git a/ldap/servers/slapd/back-ldbm/ldbm_delete.c b/ldap/servers/slapd/back-ldbm/ldbm_delete.c
246821
index f31d545..100a71d 100644
246821
--- a/ldap/servers/slapd/back-ldbm/ldbm_delete.c
246821
+++ b/ldap/servers/slapd/back-ldbm/ldbm_delete.c
246821
@@ -477,7 +477,7 @@ ldbm_back_delete( Slapi_PBlock *pb )
246821
 					 * the parent.  If we fail to lock the entry, just try again.
246821
 					 */
246821
 					while(1){
246821
-						parent = id2entry(be, pid ,NULL, &retval);
246821
+						parent = id2entry(be, pid ,&txn, &retval);
246821
 						if (parent && (cache_retry = cache_lock_entry(&inst->inst_cache, parent))) {
246821
 							/* Failed to obtain parent entry's entry lock */
246821
 							if(cache_retry == RETRY_CACHE_LOCK &&
246821
-- 
246821
2.4.3
246821