mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-03-07 14:18:15 +08:00
Add DBFLAG_CLEAN for a DB that was cleanly shut down; don't bother
scanning to verify contextCSN for clean shutdowns (ITS#5640)
This commit is contained in:
parent
1214d24cc0
commit
f463be3b95
@ -168,6 +168,8 @@ bdb_db_open( BackendDB *be, ConfigReply *cr )
|
||||
be->be_suffix[0].bv_val, 0, 0 );
|
||||
return -1;
|
||||
}
|
||||
if ( rc == ALOCK_CLEAN )
|
||||
be->be_flags |= SLAP_DBFLAG_CLEAN;
|
||||
|
||||
/*
|
||||
* The DB_CONFIG file may have changed. If so, recover the
|
||||
|
@ -2733,7 +2733,7 @@ syncprov_db_open(
|
||||
si->si_sids = slap_parse_csn_sids( si->si_ctxcsn, a->a_numvals, NULL );
|
||||
}
|
||||
overlay_entry_release_ov( op, e, 0, on );
|
||||
if ( si->si_ctxcsn ) {
|
||||
if ( si->si_ctxcsn && !SLAP_DBCLEAN( be )) {
|
||||
op->o_req_dn = be->be_suffix[0];
|
||||
op->o_req_ndn = be->be_nsuffix[0];
|
||||
op->ors_scope = LDAP_SCOPE_SUBTREE;
|
||||
|
@ -1792,6 +1792,7 @@ struct BackendDB {
|
||||
#define SLAP_DBFLAG_SINGLE_SHADOW 0x4000U /* a single-master shadow */
|
||||
#define SLAP_DBFLAG_SYNC_SHADOW 0x1000U /* a sync shadow */
|
||||
#define SLAP_DBFLAG_SLURP_SHADOW 0x2000U /* a slurp shadow */
|
||||
#define SLAP_DBFLAG_CLEAN 0x10000U /* was cleanly shutdown */
|
||||
slap_mask_t be_flags;
|
||||
#define SLAP_DBFLAGS(be) ((be)->be_flags)
|
||||
#define SLAP_NOLASTMOD(be) (SLAP_DBFLAGS(be) & SLAP_DBFLAG_NOLASTMOD)
|
||||
@ -1816,6 +1817,7 @@ struct BackendDB {
|
||||
#define SLAP_SLURP_SHADOW(be) (SLAP_DBFLAGS(be) & SLAP_DBFLAG_SLURP_SHADOW)
|
||||
#define SLAP_SINGLE_SHADOW(be) (SLAP_DBFLAGS(be) & SLAP_DBFLAG_SINGLE_SHADOW)
|
||||
#define SLAP_MULTIMASTER(be) (!SLAP_SINGLE_SHADOW(be))
|
||||
#define SLAP_DBCLEAN(be) (SLAP_DBFLAGS(be) & SLAP_DBFLAG_CLEAN)
|
||||
|
||||
slap_mask_t be_restrictops; /* restriction operations */
|
||||
#define SLAP_RESTRICT_OP_ADD 0x0001U
|
||||
|
Loading…
Reference in New Issue
Block a user