apache / helix

Mirror of Apache Helix
Apache License 2.0
457 stars 218 forks source link

[apache/helix] -- Added detail in the Exception message for WAGED rebalance (hard constraint) failures. #2829

Closed himanshukandwal closed 2 weeks ago

himanshukandwal commented 3 weeks ago

Issues

Description

In this PR, we are creating ValidationResult construct to better record the validation result details, which will be used produce a specific and detailed error message in case of Rebalance failure.

Tests


(If CI test fails due to known issue, please specify the issue and test PR locally. Then copy & paste the result of "mvn test" to here.)

### Changes that Break Backward Compatibility (Optional)

- My PR contains changes that break backward compatibility or previous assumptions for certain methods or API. They include:

(Consider including all behavior changes for public methods or API. Also include these changes in merge description so that other developers are aware of these changes. This allows them to make relevant code changes in feature branches accounting for the new method/API behavior.)

### Documentation (Optional)

- In case of new functionality, my PR adds documentation in the following wiki page:

(Link the GitHub wiki you added)

### Commits

- My commits all reference appropriate Apache Helix GitHub issues in their subject lines. In addition, my commits follow the guidelines from "[How to write a good git commit message](http://chris.beams.io/posts/git-commit/)":
  1. Subject is separated from body by a blank line
  1. Subject is limited to 50 characters (not including Jira issue reference)
  1. Subject does not end with a period
  1. Subject uses the imperative mood ("add", not "adding")
  1. Body wraps at 72 characters
  1. Body explains "what" and "why", not "how"

### Code Quality

- My diff has been formatted using helix-style.xml 
(helix-style-intellij.xml if IntelliJ IDE is used)
himanshukandwal commented 2 weeks ago

This PR has been approved by @junkaixue.

Final Commit Message: We are enabling constraint level logging in the case when WAGED algorithm is not able to find the placement for a replica. The logging will be controlled via a flag which is enabled when the failure criteria is met, else is disabled.