dsdb: Remove 120 second delay and USN from schema refresh check
authorAndrew Bartlett <abartlet@samba.org>
Wed, 4 May 2016 05:01:15 +0000 (17:01 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 6 Jul 2016 13:35:17 +0000 (15:35 +0200)
commit2a9060641757937ad764685ec35507629ce6283e
tree92291e0e8b6fd2f60f2710df5d3bdc7e6e0ef054
parent5abcdd56ba4f1b61b9421c81caa491e70c4881c4
dsdb: Remove 120 second delay and USN from schema refresh check

We now refresh it once the schema changes, so that replication can
proceed right away.  We use the sequence number in the metadata.tdb.

The previous commit added a cache for this value, protected by
tdb_seqnum().

metadata.tdb is now opened at startup to provide this support.

Note that while still supported, schemaUpdateNow is essentially rudundent:
instead, to ensure we increment the sequence number correctly, we unify that check
into repl_meta_data at the transaction close.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
source4/dsdb/repl/replicated_objects.c
source4/dsdb/samdb/ldb_modules/acl.c
source4/dsdb/samdb/ldb_modules/repl_meta_data.c
source4/dsdb/samdb/ldb_modules/schema_load.c
source4/dsdb/schema/schema.h
source4/dsdb/schema/schema_init.c