1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00
samba-mirror/source4/rpc_server/drsuapi
Tim Beale 46c1f7bdee getncchanges.c: max_links calculation didn't work well in some cases
The max_links calculation didn't work particularly well if max_links was
set to a value lower than max_objects.

As soon as repl_chunk->object_count exceeded repl_chunk->max_links, the
chunk would be deemed full, even if there was only one link to send (or
even worse, no links to send). For example, if max_objects=100 and
max_links=10, then it would send back chunks of 10 objects (or 9 objects
and 1 link).

I believe the historic reason this logic exists is to avoid overfilling
the response message. It's hard to tell what the appropriate limit would
be because the total message size would depend on how many attributes
each object has.

I couldn't think of logic that would be suitable for all cases. I toyed
with the idea of working out a percentage of how full the message is.
However, adjusting the max_links doesn't really make sense when the
settings are small enough, e.g. max_objects=100 and max_links=100 is
never going to overfill the message, so there's no reason to alter the
values.

In the end I went with:
- If the user is using non-default values, just use those.
- In the default value case, just use the historic calculation

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12972
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2017-09-18 05:51:25 +02:00
..
addentry.c debug: Add new debug class "drs_repl" for DRS replication processing 2017-09-07 06:56:27 +02:00
dcesrv_drsuapi.c debug: Add new debug class "drs_repl" for DRS replication processing 2017-09-07 06:56:27 +02:00
dcesrv_drsuapi.h drepl_server: Allow refresh of partitions on UpdateRef 2017-04-13 07:29:18 +02:00
drsutil.c debug: Add new debug class "drs_repl" for DRS replication processing 2017-09-07 06:56:27 +02:00
getncchanges.c getncchanges.c: max_links calculation didn't work well in some cases 2017-09-18 05:51:25 +02:00
updaterefs.c debug: Add new debug class "drs_repl" for DRS replication processing 2017-09-07 06:56:27 +02:00
writespn.c debug: Add new debug class "drs_repl" for DRS replication processing 2017-09-07 06:56:27 +02:00