Преглед на файлове

Ticket 47976: deadlock in mep delete post op

Bug Description:
	When deleting the original entry, some DB pages are acquired in write.
	The deadlock occurs because when reading the parent entry of the MEP entry
	MEP plugin requires read access to one of the page acquired by the deletion of the original entry.
        The read access can be granted if it is using the parent txn.
	This bug requires that the parent entry of the MEP entry is not found in the entry cache, so
	it requires database access

Fix Description:
	Fix ldbm_delete, so that it reads id2entry db with parent txn

https://fedorahosted.org/389/ticket/47976

Reviewed by: Ludwig Krispenz, Rich Megginson (Thanks you !!)

Platforms tested: F17

Flag Day: no

Doc impact: no
Thierry Bordaz преди 10 години
родител
ревизия
83c98d9d32
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      ldap/servers/slapd/back-ldbm/ldbm_delete.c

+ 1 - 1
ldap/servers/slapd/back-ldbm/ldbm_delete.c

@@ -477,7 +477,7 @@ ldbm_back_delete( Slapi_PBlock *pb )
 					 * the parent.  If we fail to lock the entry, just try again.
 					 * the parent.  If we fail to lock the entry, just try again.
 					 */
 					 */
 					while(1){
 					while(1){
-						parent = id2entry(be, pid ,NULL, &retval);
+						parent = id2entry(be, pid ,&txn, &retval);
 						if (parent && (cache_retry = cache_lock_entry(&inst->inst_cache, parent))) {
 						if (parent && (cache_retry = cache_lock_entry(&inst->inst_cache, parent))) {
 							/* Failed to obtain parent entry's entry lock */
 							/* Failed to obtain parent entry's entry lock */
 							if(cache_retry == RETRY_CACHE_LOCK &&
 							if(cache_retry == RETRY_CACHE_LOCK &&