From: Tim Beale Date: Mon, 5 Nov 2018 03:34:15 +0000 (+1300) Subject: libnet: Reset debug counters after replicating critical objects X-Git-Tag: tdb-1.3.17~918 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c21a8ed5948d04881a8900e41386dcdfbdeef326;p=thirdparty%2Fsamba.git libnet: Reset debug counters after replicating critical objects Reset the debug counters once we have finished replicating a given partition. This helps if we replicate the same partition immediately afterward with different options. This helps the DC join debug look less weird. Because it replicates the critical objects first, and then the base partition, previously it always ended up overcounting, e.g. Partition[DC=addom,DC=samba,DC=example,DC=com] objects[314/218] linked_values[48/24] Signed-off-by: Tim Beale Reviewed-by: Andrew Bartlett --- diff --git a/source4/libnet/libnet_vampire.c b/source4/libnet/libnet_vampire.c index 5bd8df13a26..6167493c359 100644 --- a/source4/libnet/libnet_vampire.c +++ b/source4/libnet/libnet_vampire.c @@ -781,6 +781,12 @@ WERROR libnet_vampire_cb_store_chunk(void *private_data, return status; } + /* reset debug counters once we've finished replicating the partition */ + if (!c->partition->more_data) { + s->total_objects = 0; + s->total_links = 0; + } + talloc_free(s_dsa); talloc_free(objs);