mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-07-15 21:12:48 -04:00
Merge branch 'its10026' into 'master'
ITS#10026 syncprov: assume context is usually dirty See merge request openldap/openldap!894
This commit is contained in:
commit
261c2d0f23
1 changed files with 11 additions and 1 deletions
|
|
@ -159,8 +159,10 @@ typedef struct syncprov_info_t {
|
|||
int si_nopres; /* Skip present phase */
|
||||
int si_usehint; /* use reload hint */
|
||||
int si_active; /* True if there are active mods */
|
||||
#ifdef USE_SI_DIRTY /* disabled due to ITS#10026 */
|
||||
int si_dirty; /* True if the context is dirty, i.e changes
|
||||
* have been made without updating the csn. */
|
||||
#endif
|
||||
time_t si_chklast; /* time of last checkpoint */
|
||||
Avlnode *si_mods; /* entries being modified */
|
||||
sessionlog *si_logs;
|
||||
|
|
@ -2465,8 +2467,10 @@ syncprov_new_ctxcsn( opcookie *opc, syncprov_info_t *si, int csn_changed, int nu
|
|||
csn_changed = 1;
|
||||
}
|
||||
}
|
||||
#ifdef USE_SI_DIRTY
|
||||
if ( csn_changed )
|
||||
si->si_dirty = 0;
|
||||
#endif
|
||||
ldap_pvt_thread_rdwr_wunlock( &si->si_csn_rwlock );
|
||||
|
||||
if ( csn_changed ) {
|
||||
|
|
@ -2608,7 +2612,9 @@ syncprov_op_response( Operation *op, SlapReply *rs )
|
|||
}
|
||||
}
|
||||
}
|
||||
#ifdef USE_SI_DIRTY
|
||||
si->si_dirty = !csn_changed;
|
||||
#endif
|
||||
ldap_pvt_thread_rdwr_wunlock( &si->si_csn_rwlock );
|
||||
|
||||
added:
|
||||
|
|
@ -3160,7 +3166,7 @@ syncprov_op_search( Operation *op, SlapReply *rs )
|
|||
int i, *sids, numcsns;
|
||||
struct berval mincsn, maxcsn;
|
||||
int minsid, maxsid;
|
||||
int dirty = 0;
|
||||
int dirty = 1; /* ITS#10026: assume context is always dirty */
|
||||
|
||||
if ( wants_sync( op ) ) {
|
||||
cb = op->o_tmpcalloc( 1, sizeof(slap_callback), op->o_tmpmemctx );
|
||||
|
|
@ -3212,6 +3218,8 @@ syncprov_op_search( Operation *op, SlapReply *rs )
|
|||
"both our DB and client empty, ignoring NO_SUCH_OBJECT\n",
|
||||
op->o_log_prefix );
|
||||
rs->sr_err = LDAP_SUCCESS;
|
||||
/* an empty context can't be dirty */
|
||||
dirty = 0;
|
||||
}
|
||||
|
||||
if ( rs->sr_err != LDAP_SUCCESS ) {
|
||||
|
|
@ -3273,7 +3281,9 @@ aband:
|
|||
ctxcsn = NULL;
|
||||
sids = NULL;
|
||||
}
|
||||
#ifdef USE_SI_DIRTY
|
||||
dirty = si->si_dirty;
|
||||
#endif
|
||||
ldap_pvt_thread_rdwr_runlock( &si->si_csn_rwlock );
|
||||
|
||||
/* If we have a cookie, handle the PRESENT lookups */
|
||||
|
|
|
|||
Loading…
Reference in a new issue