func (alloc *Allocator) establishRing() {
	if !alloc.ring.Empty() || alloc.awaitingConsensus {
		return
	}

	alloc.awaitingConsensus = true
	alloc.paxos.SetQuorum(alloc.quorum())
	alloc.propose()
	if ok, cons := alloc.paxos.Consensus(); ok {
		// If the quorum was 1, then proposing immediately
		// leads to consensus
		alloc.createRing(cons.Value)
	}
}
// Ensure we are making progress towards an established ring
Ensure we are making progress towards an established ring
// Ensure we are making progress towards an established ring
func (alloc *Allocator) establishRing() {
	if !alloc.ring.Empty() || alloc.awaitingConsensus {
		return
	}
	alloc.awaitingConsensus = true
	alloc.paxos.SetQuorum(alloc.quorum())
	alloc.propose()
	if ok, cons := alloc.paxos.Consensus(); ok {
		alloc.createRing(cons.Value)
	}
}
func ( alloc * Allocator ) establishRing ( ) { if ! alloc . ring . Empty ( ) || alloc . awaitingConsensus { return } alloc . awaitingConsensus = true alloc . paxos . SetQuorum ( alloc . quorum ( ) ) alloc . propose ( ) if ok , cons := alloc . paxos . Consensus ( ) ; ok { alloc . createRing ( cons . Value ) } }
Ensure we are making progress towards an established ring
Ensure we are making progress towards an established ring
// If the quorum was 1, then proposing immediately // leads to consensus