Explorar o código

Ticket #271 - Slow shutdown when you have 100+ replication agreements

Bug Description:  When you get into the range of 100+ repl agreements, the shutdown
                  can take a very long time to complete.  This is because each agreement
                  is its own thread, and it takes awhile to notify all of the threads.

Fix Description:  While we are shutting down each repl agreement thread, we wait for a full
                  second to see if the shutdown worked, before continuing on to the next
                  thread.  This means its going to take a minimum of 1 second for each
                  agreement.  This fix just reduces the wait to 100ms from 1000ms.

Reviewed by:

https://fedorahosted.org/389/ticket/271
Mark Reynolds %!s(int64=13) %!d(string=hai) anos
pai
achega
3f960dc105
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      ldap/servers/plugins/replication/repl5_inc_protocol.c

+ 1 - 1
ldap/servers/plugins/replication/repl5_inc_protocol.c

@@ -1907,7 +1907,7 @@ repl5_inc_stop(Private_Repl_Protocol *prp)
 	now = start;
 	while (!prp->stopped && ((now - start) < maxwait))
 	{
-		DS_Sleep(PR_SecondsToInterval(1));
+		DS_Sleep(PR_MillisecondsToInterval(100));
 		now = PR_IntervalNow();
 	}
 	if (!prp->stopped)