s4:dsdb/descriptor: skip duplicates in descriptor_sd_propagation_object()
commitf7f65ceb46d04e48667e6cba8f3e9b9fd0cd290e
authorStefan Metzmacher <metze@samba.org>
Thu, 10 Feb 2022 11:46:10 +0000 (10 12:46 +0100)
committerStefan Metzmacher <metze@samba.org>
Wed, 30 Mar 2022 12:06:21 +0000 (30 12:06 +0000)
tree66735d872a2500efb4fe859193d565f73d302941
parentbd1e667a62d63c51a3b5e43660c7c23dd855785a
s4:dsdb/descriptor: skip duplicates in descriptor_sd_propagation_object()

We're now sure that the security descriptor propagation happened
first for parent objects.

It means we can safely skip processing the same object twice in
descriptor_sd_propagation_object().

For the database with ~ 22000 objects it reduced the commit time
from 2m 50s down to 2m 24s.

The statistics are changed from:

descriptor_prepare_commit: changes: num_registrations=50000
descriptor_prepare_commit: changes: num_registered=22000
descriptor_prepare_commit: changes: num_toplevel=5
descriptor_prepare_commit: changes: num_processed=5200
descriptor_prepare_commit: objects: num_processed=68800

to:

descriptor_prepare_commit: changes: num_registrations=50000
descriptor_prepare_commit: changes: num_registered=22000
descriptor_prepare_commit: changes: num_toplevel=5
descriptor_prepare_commit: changes: num_processed=5200
descriptor_prepare_commit: objects: num_processed=22000
descriptor_prepare_commit: objects: num_skipped=41600

It means that we have "changes: num_registered" and
"objects: num_processed" exactly match the number
of replicated objects.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Wed Mar 30 12:06:21 UTC 2022 on sn-devel-184
source4/dsdb/samdb/ldb_modules/descriptor.c