|
|
dc8c34 |
From 072b6270f04618f486094e5ca712bf8e2f6dc2e2 Mon Sep 17 00:00:00 2001
|
|
|
dc8c34 |
From: Mark Reynolds <mreynolds@redhat.com>
|
|
|
dc8c34 |
Date: Fri, 7 Mar 2014 14:07:01 -0500
|
|
|
dc8c34 |
Subject: [PATCH 172/225] Ticket 47729 - Directory Server crashes if shutdown
|
|
|
dc8c34 |
during a replication initialization
|
|
|
dc8c34 |
|
|
|
dc8c34 |
Bug Description: When a shutdown was detected we marked that the total update was done
|
|
|
dc8c34 |
prematurely(prp->stopped). This allowed the replication plugin to close
|
|
|
dc8c34 |
while the total update was still in progress. Other plugins continued to
|
|
|
dc8c34 |
be shutdown (e.g. ldbm database), while the total update was using shared
|
|
|
dc8c34 |
resources - which lead to a crash.
|
|
|
dc8c34 |
|
|
|
dc8c34 |
Fix Description: Only mark the total update protocol as stopped, after it is finished using
|
|
|
dc8c34 |
shared resources.
|
|
|
dc8c34 |
|
|
|
dc8c34 |
https://fedorahosted.org/389/ticket/47729
|
|
|
dc8c34 |
|
|
|
dc8c34 |
Reviewed by: nhosoi(Thanks!)
|
|
|
dc8c34 |
(cherry picked from commit e7f7e9127717c1d432b10493b626fed334cc595f)
|
|
|
dc8c34 |
(cherry picked from commit e0fd1ffcd84d533e4cd62aae15aea504677798ab)
|
|
|
dc8c34 |
---
|
|
|
dc8c34 |
ldap/servers/plugins/replication/repl5_tot_protocol.c | 6 +-----
|
|
|
dc8c34 |
1 file changed, 1 insertion(+), 5 deletions(-)
|
|
|
dc8c34 |
|
|
|
dc8c34 |
diff --git a/ldap/servers/plugins/replication/repl5_tot_protocol.c b/ldap/servers/plugins/replication/repl5_tot_protocol.c
|
|
|
dc8c34 |
index b10d2d0..9829984 100644
|
|
|
dc8c34 |
--- a/ldap/servers/plugins/replication/repl5_tot_protocol.c
|
|
|
dc8c34 |
+++ b/ldap/servers/plugins/replication/repl5_tot_protocol.c
|
|
|
dc8c34 |
@@ -340,7 +340,6 @@ repl5_tot_run(Private_Repl_Protocol *prp)
|
|
|
dc8c34 |
prp->stopped = 0;
|
|
|
dc8c34 |
if (prp->terminate)
|
|
|
dc8c34 |
{
|
|
|
dc8c34 |
- prp->stopped = 1;
|
|
|
dc8c34 |
goto done;
|
|
|
dc8c34 |
}
|
|
|
dc8c34 |
|
|
|
dc8c34 |
@@ -362,8 +361,7 @@ repl5_tot_run(Private_Repl_Protocol *prp)
|
|
|
dc8c34 |
}
|
|
|
dc8c34 |
else if (prp->terminate)
|
|
|
dc8c34 |
{
|
|
|
dc8c34 |
- conn_disconnect(prp->conn);
|
|
|
dc8c34 |
- prp->stopped = 1;
|
|
|
dc8c34 |
+ conn_disconnect(prp->conn);
|
|
|
dc8c34 |
goto done;
|
|
|
dc8c34 |
}
|
|
|
dc8c34 |
|
|
|
dc8c34 |
@@ -646,7 +644,6 @@ int send_entry (Slapi_Entry *e, void *cb_data)
|
|
|
dc8c34 |
if (prp->terminate)
|
|
|
dc8c34 |
{
|
|
|
dc8c34 |
conn_disconnect(prp->conn);
|
|
|
dc8c34 |
- prp->stopped = 1;
|
|
|
dc8c34 |
((callback_data*)cb_data)->rc = -1;
|
|
|
dc8c34 |
return -1;
|
|
|
dc8c34 |
}
|
|
|
dc8c34 |
@@ -659,7 +656,6 @@ int send_entry (Slapi_Entry *e, void *cb_data)
|
|
|
dc8c34 |
if (rc)
|
|
|
dc8c34 |
{
|
|
|
dc8c34 |
conn_disconnect(prp->conn);
|
|
|
dc8c34 |
- prp->stopped = 1;
|
|
|
dc8c34 |
((callback_data*)cb_data)->rc = -1;
|
|
|
dc8c34 |
return -1;
|
|
|
dc8c34 |
}
|
|
|
dc8c34 |
--
|
|
|
dc8c34 |
1.8.1.4
|
|
|
dc8c34 |
|