Skip to content

Get the MinActiveReplica from Resource Config and Idea State#878

Merged
jiajunwang merged 4 commits intoapache:masterfrom
jiajunwang:delay
Mar 11, 2020
Merged

Get the MinActiveReplica from Resource Config and Idea State#878
jiajunwang merged 4 commits intoapache:masterfrom
jiajunwang:delay

Conversation

@jiajunwang
Copy link
Contributor

@jiajunwang jiajunwang commented Mar 9, 2020

Issues

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

#877

Description

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

Read the MinActiveReplica config from both Resource Config and Idea State.

Currently, the same configuration item can be configured in both Resource Config and Ideal State. In theory, the Resource Config is the right place.
This is the first step to migrate the IdealState usage to read the Resource Config.

Tests

  • The following tests are written for this issue:

TestResourceConfig.testMergeWithIdealState

  • The following is the result of the "mvn test" command on the appropriate module:

Results :

Failed tests:
org.apache.helix.integration.rebalancer.CrushRebalancers.TestCrushAutoRebalanceNonRack.testLackEnoughInstances(org.apache.helix.integration.rebalancer.CrushRebalancers.TestCrushAutoRebalanceNonRack)
Run 1: PASS
Run 2: TestCrushAutoRebalanceNonRack.testLackEnoughInstances:250 » ZkClient Failed to...

Tests run: 1086, Failures: 1, Errors: 0, Skipped: 0

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------

Rerun

Results :

Tests run: 8, Failures: 0, Errors: 0, Skipped: 0

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------

Helix-rest:

Results :

Tests run: 99, Failures: 0, Errors: 0, Skipped: 0

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 37.005 s
[INFO] Finished at: 2020-03-10T11:16:28-07:00
[INFO] ------------------------------------------------------------------------

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"

Documentation (Optional)

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

(Link the GitHub wiki you added)

Code Quality

  • My diff has been formatted using helix-style.xml
    (helix-style-intellij.xml if IntelliJ IDE is used)

@jiajunwang jiajunwang marked this pull request as ready for review March 9, 2020 21:39
jiajunwang added 4 commits March 10, 2020 10:59
…rebalance.

Currently, the same configuration item can be configured in both Resource Config and Ideal State. In theory, the Resource Config is the right place.
This is the first step to migrate the IdealState usage to read the Resource Config.
Moving forward, IdealState should not be a method for the controller to take input. And any ideal state update to the IS nodes won't trigger a rebalance pipeline.
…ctiveReplica() before we fully migrate the configs to the resource config to avoid incorrect usage.
@jiajunwang
Copy link
Contributor Author

This PR is ready to be merged, approved by @narendly

@jiajunwang jiajunwang merged commit e5c2a23 into apache:master Mar 11, 2020
@jiajunwang jiajunwang deleted the delay branch March 11, 2020 17:55
zhangmeng916 pushed a commit to zhangmeng916/helix that referenced this pull request Apr 4, 2020
…rebalance. (apache#878)

* Currently, the same configuration item can be configured in both Resource Config and Ideal State. In theory, the Resource Config is the right place.
This is the first step to migrate the IdealState usage to read the Resource Config.
Moving forward, IdealState should not be a method for the controller to take input. And any ideal state update to the IS nodes won't trigger a rebalance pipeline.

* Add setXXXIfAbsent methods to the ZNRecord for simplifying code.

* Add redundant parameter IdealState to the DelayedRebalanceUtil.getMinActiveReplica() before we fully migrate the configs to the resource config to avoid incorrect usage.
huizhilu pushed a commit to huizhilu/helix that referenced this pull request Aug 16, 2020
…rebalance. (apache#878)

* Currently, the same configuration item can be configured in both Resource Config and Ideal State. In theory, the Resource Config is the right place.
This is the first step to migrate the IdealState usage to read the Resource Config.
Moving forward, IdealState should not be a method for the controller to take input. And any ideal state update to the IS nodes won't trigger a rebalance pipeline.

* Add setXXXIfAbsent methods to the ZNRecord for simplifying code.

* Add redundant parameter IdealState to the DelayedRebalanceUtil.getMinActiveReplica() before we fully migrate the configs to the resource config to avoid incorrect usage.
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