]> git.sur5r.net Git - openldap/commitdiff
ITS#3151 always reschedule consistency_check task
authorHoward Chu <hyc@openldap.org>
Thu, 20 May 2004 00:13:05 +0000 (00:13 +0000)
committerHoward Chu <hyc@openldap.org>
Thu, 20 May 2004 00:13:05 +0000 (00:13 +0000)
servers/slapd/overlays/pcache.c

index 20923f5771ad4d9b7bbdb22a1938d809aa112284..60395e62c6c964e7cee0212beb11d5cb748a34f1 100644 (file)
@@ -1608,16 +1608,15 @@ consistency_check(
                }
                ldap_pvt_thread_mutex_unlock(&cm->remove_mutex);
        }
-       /* If there were no queries, defer processing for a while */
-       if ( pause ) {
-               ldap_pvt_thread_mutex_lock( &syncrepl_rq.rq_mutex );
-               cm->cc_paused = 1;
-               if ( ldap_pvt_runqueue_isrunning( &syncrepl_rq, rtask )) {
-                       ldap_pvt_runqueue_stoptask( &syncrepl_rq, rtask );
-               }
-               ldap_pvt_runqueue_resched( &syncrepl_rq, rtask, 1 );
-               ldap_pvt_thread_mutex_unlock( &syncrepl_rq.rq_mutex );
+       ldap_pvt_thread_mutex_lock( &syncrepl_rq.rq_mutex );
+       if ( ldap_pvt_runqueue_isrunning( &syncrepl_rq, rtask )) {
+               ldap_pvt_runqueue_stoptask( &syncrepl_rq, rtask );
        }
+       /* If there were no queries, defer processing for a while */
+       cm->cc_paused = pause;
+       ldap_pvt_runqueue_resched( &syncrepl_rq, rtask, pause );
+
+       ldap_pvt_thread_mutex_unlock( &syncrepl_rq.rq_mutex );
        return NULL;
 }