summaryrefslogtreecommitdiffstats
path: root/ldap/servers/plugins/replication
diff options
context:
space:
mode:
authorNoriko Hosoi <nhosoi@redhat.com>2007-10-18 22:40:18 +0000
committerNoriko Hosoi <nhosoi@redhat.com>2007-10-18 22:40:18 +0000
commit8eb7f7d52765adfe9cd9ff7793f81dfff0bd445b (patch)
treece91fa8ae6bc3318b8900b2e433ebc81d05f440b /ldap/servers/plugins/replication
parentd81e2fa8e34a5b8d0ceb9d35e106ba1b1cc66496 (diff)
downloadds-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/plugins/replication')
-rw-r--r--ldap/servers/plugins/replication/repl5_plugins.c36
-rw-r--r--ldap/servers/plugins/replication/repl5_replica.c8
2 files changed, 23 insertions, 21 deletions
diff --git a/ldap/servers/plugins/replication/repl5_plugins.c b/ldap/servers/plugins/replication/repl5_plugins.c
index 2c64382a..ad701b67 100644
--- a/ldap/servers/plugins/replication/repl5_plugins.c
+++ b/ldap/servers/plugins/replication/repl5_plugins.c
@@ -846,39 +846,39 @@ multimaster_postop_modrdn (Slapi_PBlock *pb)
static void
copy_operation_parameters(Slapi_PBlock *pb)
{
- Slapi_Operation *op = NULL;
- struct slapi_operation_parameters *op_params;
- supplier_operation_extension *opext;
+ Slapi_Operation *op = NULL;
+ struct slapi_operation_parameters *op_params;
+ supplier_operation_extension *opext;
Object *repl_obj;
Replica *replica;
-
+
repl_obj = replica_get_replica_for_op (pb);
/* we are only interested in the updates to replicas */
if (repl_obj)
{
/* we only save the original operation parameters for replicated operations
- since client operations don't go through urp engine and pblock data can be logged */
- slapi_pblock_get( pb, SLAPI_OPERATION, &op );
- PR_ASSERT (op);
+ since client operations don't go through urp engine and pblock data can be logged */
+ slapi_pblock_get( pb, SLAPI_OPERATION, &op );
+ PR_ASSERT (op);
replica = (Replica*)object_get_data (repl_obj);
- PR_ASSERT (replica);
+ PR_ASSERT (replica);
opext = (supplier_operation_extension*) repl_sup_get_ext (REPL_SUP_EXT_OP, op);
- if (operation_is_flag_set(op,OP_FLAG_REPLICATED) &&
+ if (operation_is_flag_set(op,OP_FLAG_REPLICATED) &&
!operation_is_flag_set(op, OP_FLAG_REPL_FIXUP))
- {
- slapi_pblock_get (pb, SLAPI_OPERATION_PARAMETERS, &op_params);
- opext->operation_parameters= operation_parameters_dup(op_params);
- }
-
- /* this condition is needed to avoid re-entering lock when
- ruv state is updated */
+ {
+ slapi_pblock_get (pb, SLAPI_OPERATION_PARAMETERS, &op_params);
+ opext->operation_parameters= operation_parameters_dup(op_params);
+ }
+
+ /* this condition is needed to avoid re-entering backend serial lock
+ when ruv state is updated */
if (!operation_is_flag_set(op, OP_FLAG_REPL_FIXUP))
{
- /* save replica generation in case it changes */
- opext->repl_gen = replica_get_generation (replica);
+ /* save replica generation in case it changes */
+ opext->repl_gen = replica_get_generation (replica);
}
object_release (repl_obj);
diff --git a/ldap/servers/plugins/replication/repl5_replica.c b/ldap/servers/plugins/replication/repl5_replica.c
index 40e84da4..702754e3 100644
--- a/ldap/servers/plugins/replication/repl5_replica.c
+++ b/ldap/servers/plugins/replication/repl5_replica.c
@@ -2258,7 +2258,8 @@ replica_write_ruv (Replica *r)
RUV_STORAGE_ENTRY_UNIQUEID,
repl_get_plugin_identity (PLUGIN_MULTIMASTER_REPLICATION),
/* Add OP_FLAG_TOMBSTONE_ENTRY so that this doesn't get logged in the Retro ChangeLog */
- OP_FLAG_REPLICATED | OP_FLAG_REPL_FIXUP | OP_FLAG_TOMBSTONE_ENTRY);
+ OP_FLAG_REPLICATED | OP_FLAG_REPL_FIXUP | OP_FLAG_TOMBSTONE_ENTRY |
+ OP_FLAG_REPL_RUV );
slapi_modify_internal_pb (pb);
slapi_pblock_get(pb, SLAPI_PLUGIN_INTOP_RESULT, &rc);
@@ -2732,7 +2733,8 @@ replica_create_ruv_tombstone(Replica *r)
e,
NULL /* controls */,
repl_get_plugin_identity(PLUGIN_MULTIMASTER_REPLICATION),
- OP_FLAG_TOMBSTONE_ENTRY | OP_FLAG_REPLICATED | OP_FLAG_REPL_FIXUP);
+ OP_FLAG_TOMBSTONE_ENTRY | OP_FLAG_REPLICATED | OP_FLAG_REPL_FIXUP |
+ OP_FLAG_REPL_RUV);
slapi_add_internal_pb(pb);
slapi_pblock_get(pb, SLAPI_PLUGIN_INTOP_RESULT, &return_value);
if (return_value == LDAP_SUCCESS)
@@ -3064,7 +3066,7 @@ replica_replace_ruv_tombstone(Replica *r)
NULL, /* controls */
RUV_STORAGE_ENTRY_UNIQUEID,
repl_get_plugin_identity (PLUGIN_MULTIMASTER_REPLICATION),
- OP_FLAG_REPLICATED | OP_FLAG_REPL_FIXUP);
+ OP_FLAG_REPLICATED | OP_FLAG_REPL_FIXUP | OP_FLAG_REPL_RUV);
slapi_modify_internal_pb (pb);