From 26095faae076cf3956f324876087f67cc952cf04 Mon Sep 17 00:00:00 2001 From: James Phillips Date: Tue, 27 Oct 2015 14:41:33 -0700 Subject: [PATCH] Sets the ignore flag on coordinate update Raft log entries. --- consul/coordinate_endpoint.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/consul/coordinate_endpoint.go b/consul/coordinate_endpoint.go index 4f429bead9..db156df5db 100644 --- a/consul/coordinate_endpoint.go +++ b/consul/coordinate_endpoint.go @@ -87,8 +87,12 @@ func (c *Coordinate) batchApplyUpdates() error { end = size } + // We set the "safe to ignore" flag on this update type so old + // servers don't crash if they see one of these. + t := structs.CoordinateBatchUpdateType | structs.IgnoreUnknownTypeFlag + slice := updates[start:end] - if _, err := c.srv.raftApply(structs.CoordinateBatchUpdateType, slice); err != nil { + if _, err := c.srv.raftApply(t, slice); err != nil { return err } }