From 02562253fd9985bb4ed8931ad171a76893c60fea Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ond=C5=99ej=20Kuzn=C3=ADk?= Date: Wed, 18 Jan 2023 12:28:05 +0000 Subject: [PATCH] ITS#9930 Just wait until si_mutex is ready We're in a much better place now and there is only a single task active for a given syncinfo_t plus the task that's just scheduled it and is wrapping up. Any remaining times this wouldn't be true are probably bugs to be fixed. --- servers/slapd/syncrepl.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/servers/slapd/syncrepl.c b/servers/slapd/syncrepl.c index 74de532d56..b738d51cb7 100644 --- a/servers/slapd/syncrepl.c +++ b/servers/slapd/syncrepl.c @@ -2052,13 +2052,7 @@ do_syncrepl( Debug( LDAP_DEBUG_TRACE, "=>do_syncrepl %s\n", si->si_ridtxt ); - /* Don't get stuck here while a pause is initiated */ - while ( ldap_pvt_thread_mutex_trylock( &si->si_mutex )) { - if ( slapd_shutdown ) - return NULL; - if ( !ldap_pvt_thread_pool_pausecheck( &connection_pool )) - ldap_pvt_thread_yield(); - } + ldap_pvt_thread_mutex_lock( &si->si_mutex ); si->si_too_old = 0; -- 2.47.2