s4-dsdb: Try to avoid much of the time a db search for msDS-IntID
authorMatthieu Patou <mat@matws.net>
Sat, 12 May 2012 09:13:42 +0000 (02:13 -0700)
committerMatthieu Patou <mat@matws.net>
Sat, 23 Jun 2012 06:22:02 +0000 (23:22 -0700)
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.


No differences found