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

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