Address code review: Fix error handling and add comment

This commit is contained in:
Cody Soyland 2018-03-07 09:45:27 -06:00
parent b7b92913d9
commit 42682e12a8
2 changed files with 3 additions and 1 deletions

View file

@ -941,7 +941,7 @@ func (c *Cluster) handleNodeAction(nodeAction nodeAction) error {
if err := c.setStateAndBroadcast(ClusterStateNormal); err != nil {
c.logger().Printf("setStateAndBroadcast error: err=%s", err)
}
return c.setStateAndBroadcast(ClusterStateNormal)
return err
}
// j.Run() runs in a goroutine because in the case where the

View file

@ -556,6 +556,8 @@ func TestClusterResize_RemoveNode(t *testing.T) {
t.Fatal(err)
}
// This is an attempt to ensure there is data on both nodes, but is not guaranteed.
// TODO: Deterministic node IDs would ensure consistent results
setBits := ""
for i := 0; i < 20; i++ {
setBits += fmt.Sprintf("SetBit(rowID=1, frame=\"f\", columnID=%d) ", i*pilosa.SliceWidth)