Skip to content

[TEST PR] Fall back to current states when best possible calculation fails#3015

Closed
GrantPSpencer wants to merge 1 commit intoapache:masterfrom
GrantPSpencer:fix-drops-on-failures
Closed

[TEST PR] Fall back to current states when best possible calculation fails#3015
GrantPSpencer wants to merge 1 commit intoapache:masterfrom
GrantPSpencer:fix-drops-on-failures

Conversation

@GrantPSpencer
Copy link
Copy Markdown
Contributor

Issues

When waged rebalance fails due to an exception that matches failure types to propagate, the controller errors out of the pipeline run and does not finish calculating a best possible state for that resource. This leads to an empty best possible state, when then leads to the partitions for that resource being dropped from nodes then immediately being reassigned once calculation proceeds. This is because the following code in MessageGenerationPhase drops the partitions:

// Look through the current state map and add DROPPED message if the instance is not in the
// resourceStateMap. This instance may not have had been dropped by the rebalance strategy.
// This check is required to ensure that the instances removed from the ideal state stateMap
// are properly dropped.
for (String instance : currentStateMap.keySet()) {
  if (!instanceStateMap.containsKey(instance)) {
    instanceStateMap.put(instance, HelixDefinedState.DROPPED.name());
  }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant