Example #1
0
File: paxos.go Project: bvk/ascent
func (this *Paxos) doUpdateConfig(change *thispb.Configuration) error {
	if !this.wal.IsRecovering() {
		record := thispb.WALRecord{}
		record.ConfigChange = change
		_, errQueue := wal.QueueChangeProto(this.wal, this.uid, &record)
		if errQueue != nil {
			this.Errorf("could not append config change wal record: %v", errQueue)
			return errQueue
		}
	}

	this.doRestoreConfig(change)
	return nil
}