示例#1
0
文件: election.go 项目: bvk/ascent
func (this *Election) doUpdateConfig(change *thispb.Configuration) error {
	walRecord := thispb.WALRecord{}
	walRecord.ConfigChange = change
	_, errSync := wal.SyncChangeProto(this.wal, this.uid, &walRecord)
	if errSync != nil {
		this.Errorf("could not append config change wal record: %v", errSync)
		return errSync
	}

	this.doRestoreConfig(change)
	return nil
}