From 7ca538ff87a4acc022a83c659502d2df49802ad1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Kuzn=C3=ADk?= Date: Tue, 7 May 2019 16:42:51 +0100 Subject: [PATCH] ITS#9015 Treat an empty cookie from a FALLBACK search as a success --- servers/slapd/syncrepl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/servers/slapd/syncrepl.c b/servers/slapd/syncrepl.c index f19217f0ac..2d1913b4a7 100644 --- a/servers/slapd/syncrepl.c +++ b/servers/slapd/syncrepl.c @@ -553,7 +553,8 @@ ldap_sync_search( } } else #endif - if ( si->si_logstate == SYNCLOG_LOGGING && !si->si_syncCookie.numcsns ) { + if ( si->si_logstate == SYNCLOG_LOGGING && !si->si_syncCookie.numcsns && + !si->si_refreshDone ) { si->si_logstate = SYNCLOG_FALLBACK; } } @@ -1492,6 +1493,7 @@ logerr: if ( err == LDAP_SUCCESS && si->si_logstate == SYNCLOG_FALLBACK ) { si->si_logstate = SYNCLOG_LOGGING; + si->si_refreshDone = 1; rc = LDAP_SYNC_REFRESH_REQUIRED; slap_resume_listeners(); } else {