[Fedora-directory-commits] ldapserver/ldap/servers/plugins/replication repl5_plugins.c, 1.9, 1.10 repl5_replica.c, 1.15, 1.16

Noriko Hosoi (nhosoi) fedora-directory-commits at redhat.com
Thu Oct 18 22:40:20 UTC 2007


Author: nhosoi

Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/replication
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv4834/plugins/replication

Modified Files:
	repl5_plugins.c repl5_replica.c 
Log Message:
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.



Index: repl5_plugins.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/replication/repl5_plugins.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- repl5_plugins.c	18 Oct 2007 00:08:31 -0000	1.9
+++ repl5_plugins.c	18 Oct 2007 22:40:17 -0000	1.10
@@ -846,39 +846,39 @@
 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);                


Index: repl5_replica.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/replication/repl5_replica.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- repl5_replica.c	18 Oct 2007 00:08:31 -0000	1.15
+++ repl5_replica.c	18 Oct 2007 22:40:17 -0000	1.16
@@ -2258,7 +2258,8 @@
 		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 @@
 		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 @@
         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);
 




More information about the Fedora-directory-commits mailing list