3.1.1.5.1.6 Replication Notification
Each NC replica on the server has an associated abstract attribute repsTo. When an originating or replicated update occurs in the NC replica on the server, the server notifies each destination DC that has an entry in repsTo. The server notifies the destination DC by calling method IDL_DRSReplicaSync. The destination DC contacts the server and requests it to provide updates—this is event-driven replication as described in section 3.1.1.1.14.
The server sends replication notifications as follows:
Let N be the NC replica where the originating or replicated update has occurred on the server.
For each i in [0 .. (N!repsTo).length-1] do the following:
Let E be N!repsTo[i].
Let pmsgIn be a reference to a structure of type DRS_MSG_REPSYNC.
Set pmsgIn->V1.pNC to dsname of N.
Let O be the nTDSDSA object of the server.
Set pmsgIn->V1.uuidDsaSrc to O!objectGUID.
Set pmsgIn->V1.ulOptions to (DRS_ASYNC_OP | DRS_UPDATE_NOTIFICATION).
If (E.replicaFlags & DRS_WRITE_REP ≠ 0) then set pmsgIn->V1.ulOptions to (pmsgIn->V1.ulOptions | DRS_WRIT_REP).
If the originating/replicated update satisfies the condition for urgent replication then set pmsgIn->V1.ulOptions to (pmsgIn->V1.ulOptions | DRS_SYNC_URGENT).
Let H be the handle obtained by calling IDL_DRSBind against E.uuidDsa. If (E.replicaFlags & DRS_REF_GCSPN ≠ 0), then, for mutual authentication of the IDL_DRSBind client, use the service principal name (2) associated with E.uuidDsa that begins with "GC" ([MS-DRSR] section 2.2.3.2).
If (pmsgIn->V1.ulOptions & DRS_SYNC_URGENT = 0), then wait for an implementation-specific time T. If i = 0 the default time T is 15 seconds; if i > 0 the default time T is 3 seconds.
Let R be the result of calling IDL_DRSReplicaSync(H, 1, pmsgIn).
Let Z be the current time.
If E.timeLastAttempt > Z or Z.timeLastAttempt - Z > an implementation-specific duration U, update N!repsTo[i] as follows:
Set E.timeLastAttempt to Z.
Set E.ulResultLastAttempt to R.
If R = 0, set E.timeLastSuccess to Z and set E.cConsecutiveFailures to 0.
If R ≠ 0, increment E.cConsecutiveFailures by 1.
Set N!repsTo[i] to E.
The default duration U is one hour.