Example #1
0
func (sts *SimpleTxnSubmitter) TopologyChanged(topology *configuration.Topology) {
	if topology == nil || topology.RMs().NonEmptyLen() < int(topology.TwoFInc) {
		// topology is needed for client txns. As we're booting up, we
		// just don't care.
		return
	}
	sts.topology = topology
	sts.resolver = ch.NewResolver(topology.RMs(), topology.TwoFInc)
	sts.hashCache.SetResolver(sts.resolver)
	if topology.Root.VarUUId != nil {
		sts.hashCache.AddPosition(topology.Root.VarUUId, topology.Root.Positions)
	}
	sts.calculateDisabledHashcodes()
}