Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 231611 Details for
Bug 329951
MMR: Supplier does not respond anymore after many operations (deletes)
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
cvs diffs
329951.diffs (text/plain), 18.90 KB, created by
Noriko Hosoi
on 2007-10-18 21:29:16 UTC
(
hide
)
Description:
cvs diffs
Filename:
MIME Type:
Creator:
Noriko Hosoi
Created:
2007-10-18 21:29:16 UTC
Size:
18.90 KB
patch
obsolete
>Index: plugins/replication/repl5_plugins.c >=================================================================== >RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/replication/repl5_plugins.c,v >retrieving revision 1.9 >diff -t -w -U4 -r1.9 repl5_plugins.c >--- plugins/replication/repl5_plugins.c 18 Oct 2007 00:08:31 -0000 1.9 >+++ plugins/replication/repl5_plugins.c 18 Oct 2007 20:45:16 -0000 >@@ -872,10 +872,10 @@ > 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 */ >+ /* 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); >Index: plugins/replication/repl5_replica.c >=================================================================== >RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/replication/repl5_replica.c,v >retrieving revision 1.15 >diff -t -w -U4 -r1.15 repl5_replica.c >--- plugins/replication/repl5_replica.c 18 Oct 2007 00:08:31 -0000 1.15 >+++ plugins/replication/repl5_replica.c 18 Oct 2007 20:45:16 -0000 >@@ -2257,9 +2257,10 @@ > NULL, /* controls */ > 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); > > /* ruv does not exist - create one */ >@@ -2731,9 +2732,10 @@ > pb, > 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) > r->repl_ruv_dirty = PR_FALSE; >@@ -3063,9 +3065,9 @@ > mods, > 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); > > slapi_pblock_get(pb, SLAPI_PLUGIN_INTOP_RESULT, &rc); >Index: slapd/slapi-private.h >=================================================================== >RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/slapi-private.h,v >retrieving revision 1.19 >diff -t -w -U4 -r1.19 slapi-private.h >--- slapd/slapi-private.h 18 Oct 2007 00:08:34 -0000 1.19 >+++ slapd/slapi-private.h 18 Oct 2007 20:45:16 -0000 >@@ -385,25 +385,41 @@ > #define OP_FLAG_PS 0x00001 > #define OP_FLAG_PS_CHANGESONLY 0x00002 > #define OP_FLAG_GET_EFFECTIVE_RIGHTS 0x00004 > #define OP_FLAG_REPLICATED 0x00008 /* A Replicated Operation */ >-#define OP_FLAG_REPL_FIXUP 0x00010 /* A Fixup Operation, generated as a >- * consequence of a Replicated Operation. */ >-#define OP_FLAG_INTERNAL 0x00020 /* An operation generated by the core >- * server or a plugin. */ >+#define OP_FLAG_REPL_FIXUP 0x00010 /* A Fixup Operation, >+ * generated as a consequence >+ * of a Replicated Operation. >+ */ >+#define OP_FLAG_INTERNAL 0x00020 /* An operation generated by >+ * the core server or a plugin. >+ */ > #define OP_FLAG_ACTION_LOG_ACCESS 0x00040 > #define OP_FLAG_ACTION_LOG_AUDIT 0x00080 > #define OP_FLAG_ACTION_SCHEMA_CHECK 0x00100 > #define OP_FLAG_ACTION_LOG_CHANGES 0x00200 > #define OP_FLAG_ACTION_INVOKE_FOR_REPLOP 0x00400 > #define OP_FLAG_NEVER_CHAIN SLAPI_OP_FLAG_NEVER_CHAIN /* 0x0800 */ > #define OP_FLAG_TOMBSTONE_ENTRY 0x01000 > #define OP_FLAG_RESURECT_ENTRY 0x02000 >-#define OP_FLAG_LEGACY_REPLICATION_DN 0x04000 /* Operation done by legacy replication DN */ >-#define OP_FLAG_ACTION_NOLOG 0x08000 /* Do not log the entry in audit log or >- * change log */ >-#define OP_FLAG_SKIP_MODIFIED_ATTRS 0x10000 /* Do not update the modifiersname, >- * modifiedtimestamp, etc. attributes */ >+#define OP_FLAG_LEGACY_REPLICATION_DN 0x04000 /* Operation done by legacy >+ * replication DN >+ */ >+#define OP_FLAG_ACTION_NOLOG 0x08000 /* Do not log the entry in >+ * audit log or change log >+ */ >+#define OP_FLAG_SKIP_MODIFIED_ATTRS 0x10000 /* Do not update the >+ * modifiersname, >+ * modifiedtimestamp, etc. >+ * attributes >+ */ >+#define OP_FLAG_REPL_RUV 0x20000 /* Flag to tell to the backend >+ * that the entry to be added/ >+ * modified is RUV. This info >+ * is used to skip VLV op. >+ * (see #329951) >+ */ >+ > > CSN *operation_get_csn(Slapi_Operation *op); > void operation_set_csn(Slapi_Operation *op,CSN *csn); > void operation_set_flag(Slapi_Operation *op,int flag); >Index: slapd/back-ldbm/ldbm_add.c >=================================================================== >RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/ldbm_add.c,v >retrieving revision 1.7 >diff -t -w -U4 -r1.7 ldbm_add.c >--- slapd/back-ldbm/ldbm_add.c 1 Oct 2007 18:52:35 -0000 1.7 >+++ slapd/back-ldbm/ldbm_add.c 18 Oct 2007 20:45:16 -0000 >@@ -103,8 +103,9 @@ > int is_replicated_operation= 0; > int is_resurect_operation= 0; > int is_tombstone_operation= 0; > int is_fixup_operation= 0; >+ int is_ruv = 0; /* True if the current entry is RUV */ > CSN *opcsn = NULL; > entry_address addr; > > slapi_pblock_get( pb, SLAPI_PLUGIN_PRIVATE, &li ); >@@ -118,8 +119,9 @@ > > is_resurect_operation= operation_is_flag_set(operation,OP_FLAG_RESURECT_ENTRY); > is_tombstone_operation= operation_is_flag_set(operation,OP_FLAG_TOMBSTONE_ENTRY); > is_fixup_operation = operation_is_flag_set(operation,OP_FLAG_REPL_FIXUP); >+ is_ruv = operation_is_flag_set(operation, OP_FLAG_REPL_RUV); > > inst = (ldbm_instance *) be->be_instance_info; > > slapi_sdn_init(&sdn); >@@ -714,17 +716,20 @@ > } > /* > * Update the Virtual List View indexes > */ >- retval= vlv_update_all_indexes(&txn, be, pb, NULL, addingentry); >- if (DB_LOCK_DEADLOCK == retval) >+ if (!is_ruv) > { >- LDAPDebug( LDAP_DEBUG_ARGS, "add DEADLOCK vlv_update_index\n", 0, 0, 0 ); >+ retval= vlv_update_all_indexes(&txn, be, pb, NULL, addingentry); >+ if (DB_LOCK_DEADLOCK == retval) { >+ LDAPDebug( LDAP_DEBUG_ARGS, >+ "add DEADLOCK vlv_update_index\n", 0, 0, 0 ); > /* Retry txn */ > continue; > } > if (0 != retval) { >- LDAPDebug( LDAP_DEBUG_TRACE, "vlv_update_index failed, err=%d %s\n", >+ LDAPDebug( LDAP_DEBUG_TRACE, >+ "vlv_update_index failed, err=%d %s\n", > retval, (msg = dblayer_strerror( retval )) ? msg : "", 0 ); > if (LDBM_OS_ERR_IS_DISKFULL(retval)) { > disk_full = 1; > ldap_result_code= LDAP_OPERATIONS_ERROR; >@@ -732,12 +737,12 @@ > } > ldap_result_code= LDAP_OPERATIONS_ERROR; > goto error_return; > } >+ } > if (retval == 0 ) { > break; > } >- > } > if (retry_count == RETRY_TIMES) { > /* Failed */ > LDAPDebug( LDAP_DEBUG_ANY, "Retry count exceeded in add\n", 0, 0, 0 ); >Index: slapd/back-ldbm/ldbm_delete.c >=================================================================== >RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/ldbm_delete.c,v >retrieving revision 1.7 >diff -t -w -U4 -r1.7 ldbm_delete.c >--- slapd/back-ldbm/ldbm_delete.c 10 Nov 2006 23:45:39 -0000 1.7 >+++ slapd/back-ldbm/ldbm_delete.c 18 Oct 2007 20:45:16 -0000 >@@ -72,8 +72,9 @@ > int dblock_acquired= 0; > Slapi_Operation *operation; > CSN *opcsn = NULL; > int is_fixup_operation = 0; >+ int is_ruv = 0; /* True if the current entry is RUV */ > int is_replicated_operation= 0; > int is_tombstone_entry = 0; /* True if the current entry is alreday a tombstone */ > int delete_tombstone_entry = 0; /* We must remove the given tombstone entry from the DB */ > int create_tombstone_entry = 0; /* We perform a "regular" LDAP delete but since we use */ >@@ -95,8 +96,9 @@ > slapi_log_error (SLAPI_LOG_TRACE, "ldbm_back_delete", "enter conn=%d op=%d\n", pb->pb_conn->c_connid, operation->o_opid); > } > > is_fixup_operation = operation_is_flag_set(operation,OP_FLAG_REPL_FIXUP); >+ is_ruv = operation_is_flag_set(operation, OP_FLAG_REPL_RUV); > delete_tombstone_entry = operation_is_flag_set(operation, OP_FLAG_TOMBSTONE_ENTRY); > > inst = (ldbm_instance *) be->be_instance_info; > >@@ -468,9 +470,10 @@ > if (LDBM_OS_ERR_IS_DISKFULL(retval)) disk_full = 1; > ldap_result_code= LDAP_OPERATIONS_ERROR; > goto error_return; > } >- } else if (delete_tombstone_entry) >+ } /* create_tombstone_entry */ >+ else if (delete_tombstone_entry) > { > /* > * We need to remove the Tombstone entry from the remaining indexes: > * objectclass=nsTombstone, nsUniqueID, nscpEntryDN >@@ -520,9 +523,9 @@ > ldap_result_code= LDAP_OPERATIONS_ERROR; > goto error_return; > } > } >- } >+ } /* delete_tombstone_entry */ > > if (parent_found) { > /* Push out the db modifications from the parent entry */ > retval = modify_update_all(be,pb,&parent_modify_c,&txn); >@@ -542,14 +545,12 @@ > } > /* > * first check if searchentry needs to be removed > * Remove the entry from the Virtual List View indexes. >- * > */ >- if(!delete_tombstone_entry && >+ if (!delete_tombstone_entry && !is_ruv && > !vlv_delete_search_entry(pb,e->ep_entry,inst)) { > retval = vlv_update_all_indexes(&txn, be, pb, e, NULL); >- } > > if (DB_LOCK_DEADLOCK == retval) > { > LDAPDebug( LDAP_DEBUG_ARGS, "delete DEADLOCK vlv_update_index\n", 0, 0, 0 ); >@@ -560,8 +561,9 @@ > if (LDBM_OS_ERR_IS_DISKFULL(retval)) disk_full = 1; > ldap_result_code= LDAP_OPERATIONS_ERROR; > goto error_return; > } >+ } > if (retval == 0 ) { > break; > } > } >Index: slapd/back-ldbm/ldbm_modify.c >=================================================================== >RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/ldbm_modify.c,v >retrieving revision 1.5 >diff -t -w -U4 -r1.5 ldbm_modify.c >--- slapd/back-ldbm/ldbm_modify.c 10 Nov 2006 23:45:39 -0000 1.5 >+++ slapd/back-ldbm/ldbm_modify.c 18 Oct 2007 20:45:16 -0000 >@@ -130,10 +130,16 @@ > modify_context *mc, > back_txn *txn) > { > static char *function_name = "modify_update_all"; >+ Slapi_Operation *operation; >+ int is_ruv = 0; /* True if the current entry is RUV */ > int retval = 0; > >+ if (pb) { /* pb could be NULL if it's called from import */ >+ slapi_pblock_get( pb, SLAPI_OPERATION, &operation ); >+ is_ruv = operation_is_flag_set(operation, OP_FLAG_REPL_RUV); >+ } > /* > * Update the ID to Entry index. > * Note that id2entry_add replaces the entry, so the Entry ID stays the same. > */ >@@ -158,9 +164,9 @@ > * Add the new entry to the Virtual List View indexes. > * Because the VLV code calls slapi_filter_test(), which requires a pb (why?), > * we allow the caller sans pb to get everything except vlv indexing. > */ >- if (NULL != pb) { >+ if (NULL != pb && !is_ruv) { > retval= vlv_update_all_indexes(txn, be, pb, mc->old_entry, mc->new_entry); > if ( 0 != retval ) { > if (DB_LOCK_DEADLOCK != retval) > { >@@ -197,8 +203,9 @@ > entry_address *addr; > int change_entry = 0; > int ec_in_cache = 0; > int is_fixup_operation= 0; >+ int is_ruv = 0; /* True if the current entry is RUV */ > CSN *opcsn = NULL; > int repl_op; > > slapi_pblock_get( pb, SLAPI_BACKEND, &be); >@@ -208,8 +215,9 @@ > slapi_pblock_get( pb, SLAPI_PARENT_TXN, (void**)&parent_txn ); > slapi_pblock_get( pb, SLAPI_OPERATION, &operation ); > slapi_pblock_get (pb, SLAPI_IS_REPLICATED_OPERATION, &repl_op); > is_fixup_operation = operation_is_flag_set(operation,OP_FLAG_REPL_FIXUP); >+ is_ruv = operation_is_flag_set(operation, OP_FLAG_REPL_RUV); > inst = (ldbm_instance *) be->be_instance_info; > > dblayer_txn_init(li,&txn); > >@@ -220,10 +228,9 @@ > * But, this lock is re-enterant for the fixup > * operations that the URP code in the Replication > * plugin generates. > */ >- if(SERIALLOCK(li) && !operation_is_flag_set(operation,OP_FLAG_REPL_FIXUP)) >- { >+ if(SERIALLOCK(li) && !operation_is_flag_set(operation,OP_FLAG_REPL_FIXUP)) { > dblayer_lock_backend(be); > dblock_acquired= 1; > } > >@@ -406,23 +413,27 @@ > } > /* > * Remove the old entry from the Virtual List View indexes. > * Add the new entry to the Virtual List View indexes. >+ * If the entry is ruv, no need to update vlv. > */ >+ if (!is_ruv) { > retval= vlv_update_all_indexes(&txn, be, pb, e, ec); > if (DB_LOCK_DEADLOCK == retval) > { > /* Abort and re-try */ > continue; > } > if (0 != retval) { >- LDAPDebug( LDAP_DEBUG_ANY, "vlv_update_index failed, err=%d %s\n", >+ LDAPDebug( LDAP_DEBUG_ANY, >+ "vlv_update_index failed, err=%d %s\n", > retval, (msg = dblayer_strerror( retval )) ? msg : "", 0 ); > if (LDBM_OS_ERR_IS_DISKFULL(retval)) disk_full = 1; > ldap_result_code= LDAP_OPERATIONS_ERROR; > goto error_return; > } > >+ } > if (0 == retval) { > break; > } > } >Index: slapd/back-ldbm/ldbm_modrdn.c >=================================================================== >RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/ldbm_modrdn.c,v >retrieving revision 1.6 >diff -t -w -U4 -r1.6 ldbm_modrdn.c >--- slapd/back-ldbm/ldbm_modrdn.c 10 Nov 2006 23:45:39 -0000 1.6 >+++ slapd/back-ldbm/ldbm_modrdn.c 18 Oct 2007 20:45:16 -0000 >@@ -1126,10 +1126,14 @@ > backend *be; > 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_OPERATION, &operation ); >+ is_ruv = operation_is_flag_set(operation, OP_FLAG_REPL_RUV); > inst = (ldbm_instance *) be->be_instance_info; > > /* > * Update the ID to Entry index. >@@ -1205,9 +1209,12 @@ > } > /* > * 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. > */ >+ if (!is_ruv) >+ { > retval= vlv_update_all_indexes(ptxn, be, pb, e, ec); > if (DB_LOCK_DEADLOCK == retval) > { > /* Abort and re-try */ >@@ -1217,8 +1224,9 @@ > { > 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; > goto error_return; > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 329951
:
227761
|
227851
| 231611 |
231711