From: Howard Chu Date: Thu, 20 May 2004 00:13:05 +0000 (+0000) Subject: ITS#3151 always reschedule consistency_check task X-Git-Tag: OPENDLAP_REL_ENG_2_2_MP~352 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=88e2a06b5e9c1fddd93280ffbe4dbc79c8035afb;p=openldap ITS#3151 always reschedule consistency_check task --- diff --git a/servers/slapd/overlays/pcache.c b/servers/slapd/overlays/pcache.c index 20923f5771..60395e62c6 100644 --- a/servers/slapd/overlays/pcache.c +++ b/servers/slapd/overlays/pcache.c @@ -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; }