From: Garming Sam Date: Wed, 20 Apr 2016 03:25:45 +0000 (+1200) Subject: dbcheck: Avoid pathological behaviour in operational module X-Git-Tag: talloc-2.1.7~217 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2ef0c9a8d4623d88414eaaf32cdd18c6ef17900a;p=thirdparty%2Fsamba.git dbcheck: Avoid pathological behaviour in operational module Because replPropertyMetadata was repeated for every object in the database, the attrs list became very long. This single line saves 20% of the time for make test TESTS=dbcheck. Signed-off-by: Garming Sam Reviewed-by: Andrew Bartlett Autobuild-User(master): Garming Sam Autobuild-Date(master): Wed Apr 20 09:12:47 CEST 2016 on sn-devel-144 --- diff --git a/python/samba/dbchecker.py b/python/samba/dbchecker.py index db0803b7a91..bcefc266c02 100644 --- a/python/samba/dbchecker.py +++ b/python/samba/dbchecker.py @@ -1229,6 +1229,10 @@ newSuperior: %s""" % (str(from_dn), str(to_rdn), str(to_base))) '''check one object''' if self.verbose: self.report("Checking object %s" % dn) + + # If we modify the pass-by-reference attrs variable, then we get a + # replPropertyMetadata for every object that we check. + attrs = list(attrs) if "dn" in map(str.lower, attrs): attrs.append("name") if "distinguishedname" in map(str.lower, attrs):