From: Howard Chu Date: Tue, 25 Mar 2003 17:49:35 +0000 (+0000) Subject: ITS#2392 - move cache_commit inside transaction. needs lock protection, X-Git-Tag: NO_SLAP_OP_BLOCKS~40 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=880b9f15ac7fa9b1571ada84e101e08c8ff5f0d3;p=openldap ITS#2392 - move cache_commit inside transaction. needs lock protection, and the lock goes away after txn_commit. Not sure what to do about the cache if txn_commit actually fails though. Since txn_prepare succeeded, should never happen. ??? --- diff --git a/servers/slapd/back-bdb/modrdn.c b/servers/slapd/back-bdb/modrdn.c index 8bf93888d2..f2f2b8c851 100644 --- a/servers/slapd/back-bdb/modrdn.c +++ b/servers/slapd/back-bdb/modrdn.c @@ -859,6 +859,7 @@ retry: /* transaction retry */ } } else { + bdb_cache_entry_commit( e ); if(( rc=TXN_COMMIT( ltid, 0 )) != 0 ) { text = "txn_commit failed"; } else { @@ -882,10 +883,6 @@ retry: /* transaction retry */ op->o_noop ? " (no-op)" : "", e->e_id, e->e_dn ); #endif text = NULL; - if ( !noop ) { - bdb_cache_entry_commit( e ); - } - } else { #ifdef NEW_LOGGING LDAP_LOG ( OPERATION, RESULTS, "bdb_modrdn: %s : %s (%d)\n",