Skip to content

Do not ignore any map or list field key change in the Change Detector.#1256

Merged
jiajunwang merged 3 commits intoapache:masterfrom
jiajunwang:changeDetector
Aug 13, 2020
Merged

Do not ignore any map or list field key change in the Change Detector.#1256
jiajunwang merged 3 commits intoapache:masterfrom
jiajunwang:changeDetector

Conversation

@jiajunwang
Copy link
Contributor

@jiajunwang jiajunwang commented Aug 12, 2020

Issues

  • My PR addresses the following Helix issues and references them in the PR description:

Fixes #1255

Description

  • Here are some details about my PR, including screenshots of any UI changes:

This PR extends the scope of the non-trimmable elements that are defined in the ResourceChangeDetector. With this change, any key changes in the Map fields or List fields won't be ignored by the change detector. Instead of just fixing the issue that modifying the IS preference list does not trigger automatic rebalance, this change will also help to prevent other potential bugs with the same root cause.

Note this change might increase the rebalancer running in some circumstances. However, given a very explicit allowlist (or blocklist) in the change detector is very expensive to maintain, the current solution trades off the potential performance impact for simplicity.

Tests

  • The following tests are written for this issue:

Modified the related tests:

  1. TestWagedRebalancer.testRebalanceOnChanges
  2. TestHelixPropoertyTimmer
  • The following is the result of the "mvn test" command on the appropriate module:

[INFO] Tests run: 1163, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 4,626.399 s - in TestSuite
[INFO]
[INFO] Results:
[INFO]
[INFO] Tests run: 1163, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:17 h
[INFO] Finished at: 2020-08-12T00:29:45-07:00
[INFO] ------------------------------------------------------------------------

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":
    1. Subject is separated from body by a blank line
    2. Subject is limited to 50 characters (not including Jira issue reference)
    3. Subject does not end with a period
    4. Subject uses the imperative mood ("add", not "adding")
    5. Body wraps at 72 characters
    6. 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)

Copy link
Contributor

@NealSun96 NealSun96 left a comment

Choose a reason for hiding this comment

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

LGTM

@jiajunwang
Copy link
Contributor Author

This PR is approved and ready to be merged.

Re-run the test, all passed.

@jiajunwang jiajunwang merged commit 096b074 into apache:master Aug 13, 2020
@jiajunwang jiajunwang deleted the changeDetector branch August 13, 2020 18:23
huizhilu pushed a commit to huizhilu/helix that referenced this pull request Aug 16, 2020
apache#1256)

This PR extends the scope of the non-trimmable elements that are defined in the ResourceChangeDetector. With this change, any key changes in the Map fields or List fields won't be ignored by the change detector.

Instead of just fixing the issue that modifying the IS preference list does not trigger automatic rebalance, this change will also help to prevent other potential bugs with the same root cause.

Note this change might increase the rebalancer running in some circumstances. However, given a very explicit allowlist (or blocklist) in the change detector is very expensive to maintain, the current solution trades off the potential performance impact for simplicity.
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.

WAGED Change Detector ignores IS list field key changes

3 participants