dsdb repl_meta_data: Don't print ldif on error
authorGary Lockyer <gary@catalyst.net.nz>
Mon, 8 Jul 2019 04:14:26 +0000 (16:14 +1200)
committerGary Lockyer <gary@samba.org>
Tue, 9 Jul 2019 03:03:25 +0000 (03:03 +0000)
Don't call ldb_ldif_message_redacted_string when linked_attr_modify
fails.  When joining a large domain this takes way to much time, in excess of 3
hours for a join on a 200k domain.

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Tim Beale <timbeale@catalyst.net.nz>
Autobuild-User(master): Gary Lockyer <gary@samba.org>
Autobuild-Date(master): Tue Jul  9 03:03:25 UTC 2019 on sn-devel-184

source4/dsdb/samdb/ldb_modules/repl_meta_data.c

index 9dd354743ff9ba084489739e5eaa5aa126bee5c5..1d800feb0c155711fec5d4d93f4be7bb5edfc4a0 100644 (file)
@@ -8459,12 +8459,11 @@ static int replmd_process_la_group(struct ldb_module *module,
        ret = linked_attr_modify(module, msg, NULL);
        if (ret != LDB_SUCCESS) {
                ldb_debug(ldb, LDB_DEBUG_WARNING,
-                         "Failed to apply linked attribute change '%s'\n%s\n",
+                         "Failed to apply linked attribute change "
+                         "Error: '%s' DN: '%s' Attribute: '%s'\n",
                          ldb_errstring(ldb),
-                         ldb_ldif_message_redacted_string(ldb,
-                                                          tmp_ctx,
-                                                          LDB_CHANGETYPE_MODIFY,
-                                                          msg));
+                         ldb_dn_get_linearized(msg->dn),
+                         attr->lDAPDisplayName);
                TALLOC_FREE(tmp_ctx);
                return ret;
        }