diff options
author | Noriko Hosoi <nhosoi@redhat.com> | 2007-10-18 22:40:18 +0000 |
---|---|---|
committer | Noriko Hosoi <nhosoi@redhat.com> | 2007-10-18 22:40:18 +0000 |
commit | 8eb7f7d52765adfe9cd9ff7793f81dfff0bd445b (patch) | |
tree | ce91fa8ae6bc3318b8900b2e433ebc81d05f440b /ldap/servers/slapd/back-ldbm/ldbm_modrdn.c | |
parent | d81e2fa8e34a5b8d0ceb9d35e106ba1b1cc66496 (diff) | |
download | ds-8eb7f7d52765adfe9cd9ff7793f81dfff0bd445b.tar.gz ds-8eb7f7d52765adfe9cd9ff7793f81dfff0bd445b.tar.xz ds-8eb7f7d52765adfe9cd9ff7793f81dfff0bd445b.zip |
Resolves #329951
Summary: MMR: Supplier does not respond anymore after many operations (deletes)
Description: introduce OP_FLAG_REPL_RUV. It's set in repl5_replica.c if the
entry is RUV. The operation should not be blocked at the backend SERIAL lock
(this is achieved by having OP_FLAG_REPL_FIXUP set in the operation flag).
But updating RUV has nothing to do with VLV, thus if the flag is set, it skips
the VLV indexing.
Diffstat (limited to 'ldap/servers/slapd/back-ldbm/ldbm_modrdn.c')
-rw-r--r-- | ldap/servers/slapd/back-ldbm/ldbm_modrdn.c | 30 |
1 files changed, 19 insertions, 11 deletions
diff --git a/ldap/servers/slapd/back-ldbm/ldbm_modrdn.c b/ldap/servers/slapd/back-ldbm/ldbm_modrdn.c index 099f2572..cc5e78bb 100644 --- a/ldap/servers/slapd/back-ldbm/ldbm_modrdn.c +++ b/ldap/servers/slapd/back-ldbm/ldbm_modrdn.c @@ -113,7 +113,7 @@ ldbm_back_modrdn( Slapi_PBlock *pb ) slapi_pblock_get( pb, SLAPI_REQUESTOR_ISROOT, &isroot ); slapi_pblock_get( pb, SLAPI_OPERATION, &operation ); slapi_pblock_get( pb, SLAPI_IS_REPLICATED_OPERATION, &is_replicated_operation ); - is_fixup_operation = operation_is_flag_set(operation,OP_FLAG_REPL_FIXUP); + is_fixup_operation = operation_is_flag_set(operation, OP_FLAG_REPL_FIXUP); if (pb->pb_conn) { @@ -1127,8 +1127,12 @@ modrdn_rename_entry_update_indexes(back_txn *ptxn, Slapi_PBlock *pb, struct ldbm ldbm_instance *inst; int retval= 0; char *msg; + Slapi_Operation *operation; + int is_ruv = 0; /* True if the current entry is RUV */ - slapi_pblock_get( pb, SLAPI_BACKEND, &be); + slapi_pblock_get( pb, SLAPI_BACKEND, &be ); + slapi_pblock_get( pb, SLAPI_OPERATION, &operation ); + is_ruv = operation_is_flag_set(operation, OP_FLAG_REPL_RUV); inst = (ldbm_instance *) be->be_instance_info; /* @@ -1206,17 +1210,21 @@ modrdn_rename_entry_update_indexes(back_txn *ptxn, Slapi_PBlock *pb, struct ldbm /* * Remove the old entry from the Virtual List View indexes. * Add the new entry to the Virtual List View indexes. + * If ruv, we don't have to update vlv. */ - retval= vlv_update_all_indexes(ptxn, be, pb, e, ec); - if (DB_LOCK_DEADLOCK == retval) + if (!is_ruv) { - /* Abort and re-try */ - goto error_return; - } - if (retval != 0) - { - LDAPDebug( LDAP_DEBUG_TRACE, "vlv_update_all_indexes failed, err=%d %s\n", retval, (msg = dblayer_strerror( retval )) ? msg : "", 0 ); - goto error_return; + retval= vlv_update_all_indexes(ptxn, be, pb, e, ec); + if (DB_LOCK_DEADLOCK == retval) + { + /* Abort and re-try */ + goto error_return; + } + if (retval != 0) + { + LDAPDebug( LDAP_DEBUG_TRACE, "vlv_update_all_indexes failed, err=%d %s\n", retval, (msg = dblayer_strerror( retval )) ? msg : "", 0 ); + goto error_return; + } } if (cache_replace( &inst->inst_cache, e, ec ) != 0 ) { retval= -1; |