zrhoffman / rpms / 389-ds-base

Forked from rpms/389-ds-base 3 years ago
Clone

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

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