summaryrefslogtreecommitdiff
path: root/selftest/target
diff options
context:
space:
mode:
authorTim Beale <timbeale@catalyst.net.nz>2017-06-07 10:46:47 +1200
committerDouglas Bagnall <dbagnall@samba.org>2017-09-15 10:07:33 +0200
commite115a4231845b8512eb70478f306f2e8bcbfd64f (patch)
tree1ea259bd521313e650b481a717d7c20133080b8c /selftest/target
parentc15c53817cd8ef7d7a383aebf138791b63c91f14 (diff)
downloadsamba-e115a4231845b8512eb70478f306f2e8bcbfd64f.tar.gz
getncchanges.c: Send linked attributes in each chunk
Instead of sending all the linked attributes at the end, add a configurable option to send the links in each replication chunk. The benefits of this approach are: - it can reduce memory overhead, as we don't have to keep all the links in memory over the entire replication cycle. - the client should never end up knowing about objects but not their links. (Although we're not sure that this has actually resulted in replication problems, i.e. missing links). Note that until we support GET_TGT, this approach can mean we now send a link where the client doesn't know about the target object, causing the client to siliently drop that linked attribute. Hence, this option is switched off by default. Implementation-wise, this code works fairly the same as before. Instead of sorting the entire getnc_state->la_sorted array at the end and then splitting it up over chunks, we now split the links up over chunks and then sort them when we copy them into the message. This should be OK, as I believe the MS-DRSR Doc says the links in the message should be sorted (rather than sorting *all* the links overall). Windows behaviour seems to chunk the links based on USN and then sort them. getnc_state->la_idx now tracks which links in getnc_state->la_list[] have already been sent (instead of tracking getnc_state->la_sorted). This means the la_sorted array no longer needs to be stored in getnc_state and we can free the array's memory once we've copied the links into the message. Unfortunately, the link_given/link_total debug no longer reports the correct information, so I've moved these into getncchanges_state struct (and now free the struct a bit later so it's safe to reference in the debug). The vampire_dc testenv has been updated to use this new behaviour. Signed-off-by: Tim Beale <timbeale@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Autobuild-User(master): Douglas Bagnall <dbagnall@samba.org> Autobuild-Date(master): Fri Sep 15 10:07:33 CEST 2017 on sn-devel-144
Diffstat (limited to 'selftest/target')
-rwxr-xr-xselftest/target/Samba4.pm6
1 files changed, 5 insertions, 1 deletions
diff --git a/selftest/target/Samba4.pm b/selftest/target/Samba4.pm
index 39a64ae3d81..f0f704237c6 100755
--- a/selftest/target/Samba4.pm
+++ b/selftest/target/Samba4.pm
@@ -1288,9 +1288,12 @@ sub provision_vampire_dc($$$)
my ($self, $prefix, $dcvars, $fl) = @_;
print "PROVISIONING VAMPIRE DC @ FL $fl...\n";
my $name = "localvampiredc";
+ my $extra_conf = "";
if ($fl == "2000") {
- $name = "vampire2000dc";
+ $name = "vampire2000dc";
+ } else {
+ $extra_conf = "drs: immediate link sync = yes";
}
# We do this so that we don't run the provision. That's the job of 'net vampire'.
@@ -1310,6 +1313,7 @@ sub provision_vampire_dc($$$)
server max protocol = SMB2
ntlm auth = mschapv2-and-ntlmv2-only
+ $extra_conf
[sysvol]
path = $ctx->{statedir}/sysvol