6.2.2.4 Removing Unnecessary Connections

This task deletes nTDSConnection objects that are not needed to imply edges in any NC replica graph.

Given an nTDSConnection object cn, if the DC with the nTDSDSA object dc that is the parent object of cn and the DC with the nTDSDA object referenced by cn!fromServer are in the same site, the KCC on dc deletes cn if all of the following are true:

  • Bit NTDSCONN_OPT_IS_GENERATED is set in cn!options.

  • No site settings object s exists for the local DC's site, or bit NTDSSETTINGS_OPT_IS_TOPL_CLEANUP_DISABLED is clear in s!options.

  • Another nTDSConnection object cn2 exists such that cn and cn2 have the same parent object, cn!fromServer = cn2!fromServer, and either

  • Bit NTDSCONN_OPT_RODC_TOPOLOGY is clear in cn!options

Given an nTDSConnection object cn, if the DC with the nTDSDSA object dc that is the parent object of cn and the DC with the nTDSDSA object referenced by cn!fromServer are in different sites, a KCC acting as an ISTG in dc's site deletes cn if all of the following are true:

  • Bit NTDSCONN_OPT_IS_GENERATED is set in cn!options.

  • cn!fromServer references an nTDSDSA object for a DC in a site other than the local DC's site.

  • The keepConnections sequence returned by CreateIntersiteConnections() does not contain cn!objectGUID, or cn is "superseded by" (see below) another nTDSConnection cn2 and keepConnections contains cn2!objectGUID.

  • The return value of CreateIntersiteConnections() was true.

  • Bit NTDSCONN_OPT_RODC_TOPOLOGY is clear in cn!options

An nTDSConnection cn is said to be "superseded by" another nTDSConnection cn2 if both of the following are true:

  • If cn implies a tuple in r!repsFrom, cn2 also implies a tuple in r!repsFrom.

  • If s is (cn!fromServer)!objectGUID and t is (cn!parent)!objectGUID, BridgeheadDCFailed(s, true) = false and BridgeheadDCFailed(t, true) = false.