Blame SOURCES/0024-Ticket-49209-Hang-due-to-omitted-replica-lock-releas.patch

6f51e1
From 765520fa7bf49f2de542d619b0fce99e13e4d53a Mon Sep 17 00:00:00 2001
6f51e1
From: Thierry Bordaz <tbordaz@redhat.com>
6f51e1
Date: Tue, 4 Apr 2017 10:44:55 +0200
6f51e1
Subject: [PATCH] Ticket 49209 - Hang due to omitted replica lock release
6f51e1
6f51e1
Bug Description:
6f51e1
    When an operation is canceled (failure), its csn is aborted
6f51e1
    and removed from the pending list.
6f51e1
    If at that time the pending list is empty or the csn is not found
6f51e1
    in that list, the cancel callback forgots to release the replica lock
6f51e1
6f51e1
Fix Description:
6f51e1
    Release replica lock systematically, whether cnsplRemove fails or not
6f51e1
6f51e1
https://pagure.io/389-ds-base/issue/49209
6f51e1
6f51e1
Reviewed by: Mark Reynolds (thanks Mark !!)
6f51e1
6f51e1
Platforms tested: F23
6f51e1
6f51e1
Flag Day: no
6f51e1
6f51e1
Doc impact: no
6f51e1
---
6f51e1
 ldap/servers/plugins/replication/repl5_replica.c | 1 +
6f51e1
 1 file changed, 1 insertion(+)
6f51e1
6f51e1
diff --git a/ldap/servers/plugins/replication/repl5_replica.c b/ldap/servers/plugins/replication/repl5_replica.c
6f51e1
index 7beef50..5718a98 100644
6f51e1
--- a/ldap/servers/plugins/replication/repl5_replica.c
6f51e1
+++ b/ldap/servers/plugins/replication/repl5_replica.c
6f51e1
@@ -3662,6 +3662,7 @@ abort_csn_callback(const CSN *csn, void *data)
6f51e1
         int rc = csnplRemove(r->min_csn_pl, csn);
6f51e1
         if (rc) {
6f51e1
             slapi_log_err(SLAPI_LOG_ERR, repl_plugin_name, "abort_csn_callback - csnplRemove failed");
6f51e1
+            replica_unlock(r->repl_lock);
6f51e1
             return;
6f51e1
         }
6f51e1
     }
6f51e1
-- 
6f51e1
2.9.3
6f51e1