Skip to content

GEODE-5971: refactor RebalanceCommand to use ResultModel#3303

Merged
jinmeiliao merged 3 commits intoapache:developfrom
jinmeiliao:rebalance
Mar 21, 2019
Merged

GEODE-5971: refactor RebalanceCommand to use ResultModel#3303
jinmeiliao merged 3 commits intoapache:developfrom
jinmeiliao:rebalance

Conversation

@jinmeiliao
Copy link
Copy Markdown
Member

Thank you for submitting a contribution to Apache Geode.

In order to streamline the review of the contribution we ask you
to ensure the following steps have been taken:

For all changes:

  • Is there a JIRA ticket associated with this PR? Is it referenced in the commit message?

  • Has your PR been rebased against the latest commit within the target branch (typically develop)?

  • Is your initial contribution a single, squashed commit?

  • Does gradlew build run cleanly?

  • Have you written or updated unit tests to verify your changes?

  • If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0?

Note:

Please ensure that once the PR is submitted, you check travis-ci for build issues and
submit an update to your PR as soon as possible. If you need help, please send an
email to dev@geode.apache.org.

@jinmeiliao
Copy link
Copy Markdown
Member Author

@Petahhh

}

// if the result contains only error section, then we need to mark the result as error status
if (result.getSection("error") != null && result.getSectionSize() == 1) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems inconsistent with our overall stance that even a single member error would result in the overall command returning an error.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am trying not to change the old behavior. This seems like the only way to make sure of that...

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this an edge case? It would be nice if the comment gave some example of how you might end up with exactly 1 error section and no other sections, as well as mention other path(s) by which error status is set and why those existing codepaths are not able to cover this one edge case.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comments added to explain the reason to do it this way.

@jinmeiliao jinmeiliao merged commit 3b54352 into apache:develop Mar 21, 2019
@jinmeiliao jinmeiliao deleted the rebalance branch March 21, 2019 19:57
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.

3 participants