func (this *Paxos) doUpdateProposer(change *thispb.ProposerChange) error { if !this.wal.IsRecovering() { walRecord := thispb.WALRecord{} walRecord.ProposerChange = change _, errSync := wal.SyncChangeProto(this.wal, this.uid, &walRecord) if errSync != nil { this.Errorf("could not write proposer change record: %v", errSync) return errSync } } if change.ProposalBallot != nil { ballot := change.GetProposalBallot() if this.proposalBallot < ballot { this.proposalBallot = ballot } } return nil }