Skip to content

Commit

Permalink
Issue #21: Correct update node format for manual replicas (#22)
Browse files Browse the repository at this point in the history
Motivation
----------
Updating manual replicas is showing nodes for all replicas, not just the
specific replica being updated.

Modifications
-------------
Use withClause so that the display is for the specific nodes on this
update.

Show both the current and new node assignments.

Results
-------
Information is now accurate.
  • Loading branch information
brantburnett authored Apr 15, 2018
1 parent e438845 commit 0fea25a
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions app/update-index-mutation.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,12 @@ export class UpdateIndexMutation extends IndexMutation {
` Repl: ${this.definition.num_replica}`));
}

if (this.definition.nodes && this.existingIndex.nodes &&
!isEqual(this.definition.nodes, this.existingIndex.nodes)) {
if (this.withClause.nodes && this.existingIndex.nodes &&
!isEqual(this.withClause.nodes, this.existingIndex.nodes)) {
logger.info(chalk.cyanBright(
` Nodes: ${this.definition.nodes.join()}`));
` Nodes: ${this.existingIndex.nodes.join()}`));
logger.info(chalk.cyanBright(
` ->: ${this.withClause.nodes.join()}`));
}
}

Expand Down

0 comments on commit 0fea25a

Please sign in to comment.