diff --git a/cluster.go b/cluster.go index 63a558b2f..4f29196bc 100644 --- a/cluster.go +++ b/cluster.go @@ -995,8 +995,6 @@ func (c *Cluster) generateResizeJobByAction(nodeAction nodeAction) (*ResizeJob, toCluster.addNodeBasicSorted(nodeAction.uri) } - pbSchema := c.Holder.EncodeSchema() - // multiIndex is a map of sources initialized with all the nodes in toCluster. multiIndex := make(map[URI][]*internal.ResizeSource) @@ -1029,7 +1027,7 @@ func (c *Cluster) generateResizeJobByAction(nodeAction nodeAction) (*ResizeJob, URI: u.Encode(), Coordinator: encodeURI(c.Coordinator), Sources: sources, - Schema: pbSchema, // Include the schema to ensure it's in sync on the receiving node. + Schema: c.Holder.EncodeSchema(), // Include the schema to ensure it's in sync on the receiving node. ClusterStatus: c.Status(), } j.Instructions = append(j.Instructions, instr) diff --git a/holder.go b/holder.go index 8aeb6e1e8..cdbb59549 100644 --- a/holder.go +++ b/holder.go @@ -278,7 +278,7 @@ func (h *Holder) EncodeMaxSlices() *internal.MaxSlices { } } -// EncodeSchema creates and internal representation of schema. +// EncodeSchema creates an internal representation of schema. func (h *Holder) EncodeSchema() *internal.Schema { return &internal.Schema{ Indexes: EncodeIndexes(h.Indexes()),