mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-02-18 18:18:06 -05:00
ITS#9534 fix delta-sync startup
When transitioning from plain refresh to delta mode, don't
wait for a reschedule, go immediately.
Partially reverts f2740c79b3
This commit is contained in:
parent
d8dac4beca
commit
904863cb00
1 changed files with 11 additions and 0 deletions
|
|
@ -1900,6 +1900,8 @@ done:
|
|||
if ( msg ) ldap_msgfree( msg );
|
||||
|
||||
if ( rc ) {
|
||||
if ( rc == LDAP_SYNC_REFRESH_REQUIRED && si->si_logstate == SYNCLOG_LOGGING && si->si_ld )
|
||||
return rc;
|
||||
/* never reuse existing connection */
|
||||
if ( si->si_conn ) {
|
||||
connection_client_stop( si->si_conn );
|
||||
|
|
@ -2044,6 +2046,7 @@ do_syncrepl(
|
|||
rc = do_syncrep1( op, si );
|
||||
}
|
||||
|
||||
reload:
|
||||
/* Process results */
|
||||
if ( rc == LDAP_SUCCESS ) {
|
||||
ldap_get_option( si->si_ld, LDAP_OPT_DESC, &s );
|
||||
|
|
@ -2065,6 +2068,14 @@ do_syncrepl(
|
|||
op->o_ndn = op->o_bd->be_rootndn;
|
||||
rc = do_syncrep2( op, si );
|
||||
if ( rc == LDAP_SYNC_REFRESH_REQUIRED ) {
|
||||
if ( si->si_logstate == SYNCLOG_LOGGING ) {
|
||||
if ( BER_BVISNULL( &si->si_syncCookie.octet_str ))
|
||||
slap_compose_sync_cookie( NULL, &si->si_syncCookie.octet_str,
|
||||
si->si_syncCookie.ctxcsn, si->si_syncCookie.rid,
|
||||
si->si_syncCookie.sid, NULL );
|
||||
rc = ldap_sync_search( si, op->o_tmpmemctx );
|
||||
goto reload;
|
||||
}
|
||||
/* give up but schedule an immedite retry */
|
||||
rc = SYNC_PAUSED;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue