From 5fe26076932f65c6a0387ed02cddb485aa0b4cf0 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Thu, 16 Jun 2016 09:31:21 +1200 Subject: [PATCH] dsdb: Apply linked attribute backlinks as we apply the forward links 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 Reviewed-by: Garming Sam --- source4/dsdb/samdb/ldb_modules/repl_meta_data.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c index cf49a3c1d4e..8a7e482d99c 100644 --- a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c +++ b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c @@ -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; @@ -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; @@ -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;