Skip to content

Commit

Permalink
dsdb: Apply linked attribute backlinks as we apply the forward links
Browse files Browse the repository at this point in the history
Otherwise, we spend a lot of time checking if the link is in the list, which is pointless
and very costly in large domains

Signed-off-by: Andrew Bartlett <[email protected]>
Reviewed-by: Garming Sam <[email protected]>
  • Loading branch information
abartlet committed Jun 26, 2016
1 parent 4fb2363 commit 5fe2607
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions source4/dsdb/samdb/ldb_modules/repl_meta_data.c
Original file line number Diff line number Diff line change
Expand Up @@ -6075,7 +6075,7 @@ linked_attributes[0]:

if (!(rmd_flags & DSDB_RMD_FLAG_DELETED)) {
/* remove the existing backlink */
ret = replmd_add_backlink(module, schema, &la->identifier->guid, &guid, false, attr, false);
ret = replmd_add_backlink(module, schema, &la->identifier->guid, &guid, false, attr, true);
if (ret != LDB_SUCCESS) {
talloc_free(tmp_ctx);
return ret;
Expand All @@ -6095,7 +6095,7 @@ linked_attributes[0]:

if (active) {
/* add the new backlink */
ret = replmd_add_backlink(module, schema, &la->identifier->guid, &guid, true, attr, false);
ret = replmd_add_backlink(module, schema, &la->identifier->guid, &guid, true, attr, true);
if (ret != LDB_SUCCESS) {
talloc_free(tmp_ctx);
return ret;
Expand Down Expand Up @@ -6130,7 +6130,7 @@ linked_attributes[0]:

if (active) {
ret = replmd_add_backlink(module, schema, &la->identifier->guid, &guid,
true, attr, false);
true, attr, true);
if (ret != LDB_SUCCESS) {
talloc_free(tmp_ctx);
return ret;
Expand Down

0 comments on commit 5fe2607

Please sign in to comment.