The Samba-Bugzilla – Attachment 13580 Details for
Bug 13025
Continuous re-index possible
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
proposed patch for master
0001-MASTER-FIRST-schema-Rework-dsdb_schema_set_indices_a.patch (text/plain), 2.00 KB, created by
Andrew Bartlett
on 2017-09-12 06:26:14 UTC
(
hide
)
Description:
proposed patch for master
Filename:
MIME Type:
Creator:
Andrew Bartlett
Created:
2017-09-12 06:26:14 UTC
Size:
2.00 KB
patch
obsolete
>From 58178c5019bece21e18449a776f67f990f34e74f Mon Sep 17 00:00:00 2001 >From: Andrew Bartlett <abartlet@samba.org> >Date: Mon, 11 Sep 2017 15:22:23 +1200 >Subject: [PATCH] MASTER FIRST: schema: Rework > dsdb_schema_set_indices_and_attributes() db operations > >Commit ec9b1e881c3eef503d6b4b311594113acf7d47d8 did not fully fix this. > >There is no value in using dsdb_replace(), we are under the read lock >and replace just confuses things further. > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=13025 > >Signed-off-by: Andrew Bartlett <abartlet@samba.org> >(cherry picked from commit 96eb2b0abf8a68941cd38f2630857d5d1dec3468) >--- > source4/dsdb/schema/schema_set.c | 17 +++++++++-------- > 1 file changed, 9 insertions(+), 8 deletions(-) > >diff --git a/source4/dsdb/schema/schema_set.c b/source4/dsdb/schema/schema_set.c >index cfd320b2407..8141e323e50 100644 >--- a/source4/dsdb/schema/schema_set.c >+++ b/source4/dsdb/schema/schema_set.c >@@ -175,11 +175,11 @@ int dsdb_schema_set_indices_and_attributes(struct ldb_context *ldb, > } > if (mod_msg->num_elements > 0) { > /* >- * Do the replace with the constructed message, >- * to avoid needing a lock between this search >- * and the replace >+ * Do the replace with the difference, as we >+ * are under the read lock and we wish to do a >+ * delete of any removed/renamed attributes > */ >- ret = dsdb_replace(ldb, msg, 0); >+ ret = dsdb_modify(ldb, mod_msg, 0); > } > talloc_free(mod_msg); > } >@@ -235,12 +235,13 @@ int dsdb_schema_set_indices_and_attributes(struct ldb_context *ldb, > * @SAMBA_FEATURES_SUPPORTED > */ > } else if (mod_msg->num_elements > 0) { >+ > /* >- * Do the replace with the constructed message, >- * to avoid needing a lock between this search >- * and the replace >+ * Do the replace with the difference, as we >+ * are under the read lock and we wish to do a >+ * delete of any removed/renamed attributes > */ >- ret = dsdb_replace(ldb, msg_idx, 0); >+ ret = dsdb_modify(ldb, mod_msg, 0); > } > talloc_free(mod_msg); > } >-- >2.11.0 >
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 Raw
Actions:
View
Attachments on
bug 13025
: 13580 |
13604