andykimpe / rpms / 389-ds-base

Forked from rpms/389-ds-base 5 months ago
Clone

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

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