summaryrefslogtreecommitdiff
path: root/source4/dsdb/schema
diff options
context:
space:
mode:
authorMatthieu Patou <mat@matws.net>2012-05-22 15:13:04 -0700
committerMatthieu Patou <mat@matws.net>2012-06-22 23:42:08 -0700
commit718ed842ba0b56ec2310feb415e83ce15284868f (patch)
treed9767307915f9e1d960d74dd33335bd295c144f8 /source4/dsdb/schema
parent6f3a8b41f5b43c35263a401b2bddbe4e49812b85 (diff)
downloadsamba-718ed842ba0b56ec2310feb415e83ce15284868f.tar.gz
samba-718ed842ba0b56ec2310feb415e83ce15284868f.tar.bz2
samba-718ed842ba0b56ec2310feb415e83ce15284868f.zip
s4-dsdb: Check for key SCHEMA_SEQ_NUM in metadata.tdb updates
If the value has changed then reload the schema, this means that now the schema is only reloaded on a periodical basis or if we have been asked explicitly to do it and not necesserly if the schema partition has changed.
Diffstat (limited to 'source4/dsdb/schema')
-rw-r--r--source4/dsdb/schema/schema.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/source4/dsdb/schema/schema.h b/source4/dsdb/schema/schema.h
index b2f7bac1d1..b7ea09ead8 100644
--- a/source4/dsdb/schema/schema.h
+++ b/source4/dsdb/schema/schema.h
@@ -247,7 +247,14 @@ struct dsdb_schema {
bool refresh_in_progress;
time_t ts_last_change;
time_t last_refresh;
- /* an 'opaque' sequence number that the reload function may also wish to use */
+ /* This 'opaque' is stored in the metadata and is used by one process to signal
+ * that others have to reload the schema
+ */
+ uint64_t metadata_usn;
+ /* an 'opaque' sequence number that is used in the reload to check if a reload
+ * should really be performed, as the schema is periodically reloaded this
+ * is still needed in order to avoid costly complete schema reload.
+ */
uint64_t reload_seq_number;
/* Should the syntax handlers in this case handle all incoming OIDs automatically, assigning them as an OID if no text name is known? */