From 0e00a1af792d129018ea196d599f3402f5cb65bf Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Thu, 30 Jun 2005 03:42:51 +0000 Subject: [PATCH] ITS#3456 - omit FIND_MAXCSN call from syncprov_db_open. Will probably delete all associated code soon; since the maxcsn will be updated as soon as any write op occurs, it's no big deal for this to be out of date. Also, since the maxcsn will get checkpointed on close, it will only get out of date on an actual slapd crash, which is hopefully too rare to worry about. --- servers/slapd/overlays/syncprov.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/servers/slapd/overlays/syncprov.c b/servers/slapd/overlays/syncprov.c index 74d428c4bc..97ce411019 100644 --- a/servers/slapd/overlays/syncprov.c +++ b/servers/slapd/overlays/syncprov.c @@ -2166,11 +2166,13 @@ syncprov_db_open( strcpy( ctxcsnbuf, si->si_ctxcsnbuf ); } be_entry_release_rw( op, e, 0 ); +#if 0 /* ITS#3456, can't check this here. I think we're fine without it. */ op->o_bd->bd_info = (BackendInfo *)on; op->o_req_dn = be->be_suffix[0]; op->o_req_ndn = be->be_nsuffix[0]; op->ors_scope = LDAP_SCOPE_SUBTREE; syncprov_findcsn( op, FIND_MAXCSN ); +#endif } else if ( SLAP_SYNC_SHADOW( op->o_bd )) { /* If we're also a consumer, and we didn't find the context entry, * then don't generate anything, wait for our provider to send it @@ -2185,11 +2187,10 @@ syncprov_db_open( } /* If our ctxcsn is different from what was read from the root - * entry, write the new value out. + * entry, make sure we do a checkpoint on close */ if ( strcmp( si->si_ctxcsnbuf, ctxcsnbuf )) { - SlapReply rs = {REP_RESULT}; - syncprov_checkpoint( op, &rs, on ); + si->si_numops++; } out: -- 2.39.5