diff options
author | Matthieu Patou <mat@matws.net> | 2012-05-12 02:13:42 -0700 |
---|---|---|
committer | Matthieu Patou <mat@matws.net> | 2012-06-22 23:22:02 -0700 |
commit | 6edd940135d97e80d70e2b48d8019be5d3557f64 (patch) | |
tree | c2df17fb50e6cf098399839f26de622f2b9a94da /source4/dsdb/samdb/samdb.h | |
parent | 1521bb95a7bb3df5cb3a128085a088cb09555f8b (diff) | |
download | samba-6edd940135d97e80d70e2b48d8019be5d3557f64.tar.gz samba-6edd940135d97e80d70e2b48d8019be5d3557f64.tar.bz2 samba-6edd940135d97e80d70e2b48d8019be5d3557f64.zip |
s4-dsdb: Try to avoid much of the time a db search for msDS-IntID
We search in the schema if we have already this intid (using dsdb_attribute_by_attributeID_id because
in the range 0x80000000 0xBFFFFFFFF, attributeID is a DSDB_ATTID_TYPE_INTID).
If so generate another random value.
If not check if the highest USN in the database for the schema partition is the
one that we know.
If so it means that's only this ldb context that is touching the schema in the database.
If not it means that's someone else has modified the database while we are doing our changes too
(this case should be very bery rare) in order to be sure do the search in the database.
Diffstat (limited to 'source4/dsdb/samdb/samdb.h')
-rw-r--r-- | source4/dsdb/samdb/samdb.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source4/dsdb/samdb/samdb.h b/source4/dsdb/samdb/samdb.h index 2a4bd355eb..73da3e20cf 100644 --- a/source4/dsdb/samdb/samdb.h +++ b/source4/dsdb/samdb/samdb.h @@ -191,6 +191,13 @@ struct dsdb_openldap_dereference_result_control { struct dsdb_openldap_dereference_result **attributes; }; +struct samldb_msds_intid_persistant { + uint32_t msds_intid; + uint64_t usn; +}; + +#define SAMLDB_MSDS_INTID_OPAQUE "SAMLDB_MSDS_INTID_OPAQUE" + #define DSDB_PARTITION_DN "@PARTITION" #define DSDB_PARTITION_ATTR "partition" |