mirror of https://github.com/hashicorp/consul
Merge pull request #1413 from hashicorp/b-coord-raft-errors
Adds a check for in-band error returns in the coordinate RaftApply.pull/1379/merge
commit
ff351b289a
|
@ -92,9 +92,13 @@ func (c *Coordinate) batchApplyUpdates() error {
|
||||||
t := structs.CoordinateBatchUpdateType | structs.IgnoreUnknownTypeFlag
|
t := structs.CoordinateBatchUpdateType | structs.IgnoreUnknownTypeFlag
|
||||||
|
|
||||||
slice := updates[start:end]
|
slice := updates[start:end]
|
||||||
if _, err := c.srv.raftApply(t, slice); err != nil {
|
resp, err := c.srv.raftApply(t, slice)
|
||||||
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
if respErr, ok := resp.(error); ok {
|
||||||
|
return respErr
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue