From: Andréas Leroux Date: Thu, 2 May 2024 08:29:52 +0000 (+0200) Subject: netcmd: Increase the transaction_index_cache_size to 200k for schemaupgrade X-Git-Tag: samba-4.20.8~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=848cdca0b53debe6e539124460b170b3fbde067a;p=thirdparty%2Fsamba.git netcmd: Increase the transaction_index_cache_size to 200k for schemaupgrade Increasing this value greatly improve the performances of schema upgrade for large domains (>200k entries). The value 200000 is chosen because it is already used in join.py, and should be sufficient for known domains. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15795 Signed-off-by: Andréas Leroux Reviewed-by: Douglas Bagnall Reviewed-by: Andrew Bartlett (cherry picked from commit 5092d7f46b8491e4a2d973a00aff4d6c0e77945e) --- diff --git a/python/samba/netcmd/domain/schemaupgrade.py b/python/samba/netcmd/domain/schemaupgrade.py index ff00a771b20..33b942ca460 100644 --- a/python/samba/netcmd/domain/schemaupgrade.py +++ b/python/samba/netcmd/domain/schemaupgrade.py @@ -244,7 +244,11 @@ class cmd_domain_schema_upgrade(Command): temp_folder = None - samdb = SamDB(url=H, session_info=system_session(), credentials=creds, lp=lp) + # we set the transaction_index_cache_size to 200,000 to ensure it is + # not too small, if it's too small the performance of the upgrade will + # be negatively impacted. (similarly to the join operation) + samdb = SamDB(url=H, session_info=system_session(), credentials=creds, lp=lp, + options=['transaction_index_cache_size:200000']) # we're not going to get far if the config doesn't allow schema updates if lp.get("dsdb:schema update allowed") is None: