Skip to content

Optimize the input parameters for LeaderBalancer#12374

Merged
OneSizeFitsQuorum merged 3 commits intomasterfrom
leader-balance-constraint
Apr 19, 2024
Merged

Optimize the input parameters for LeaderBalancer#12374
OneSizeFitsQuorum merged 3 commits intomasterfrom
leader-balance-constraint

Conversation

@CRZbulabula
Copy link
Copy Markdown
Contributor

Optimize the input parameters for LeaderBalancer to:

  public abstract Map<TConsensusGroupId, Integer> generateOptimalLeaderDistribution(
      Map<String, List<TConsensusGroupId>> databaseRegionGroupMap,
      Map<TConsensusGroupId, TRegionReplicaSet> regionReplicaSetMap,
      Map<TConsensusGroupId, Integer> regionLeaderMap,
      Map<Integer, NodeStatistics> dataNodeStatisticsMap,
      Map<TConsensusGroupId, Map<Integer, RegionStatistics>> regionStatisticsMap);

The leader balancing process thus has the ability to consider both cluster NodeStatistics and RegionStatistics

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 18, 2024

Codecov Report

Attention: Patch coverage is 71.42857% with 26 lines in your changes are missing coverage. Please review.

Project coverage is 46.34%. Comparing base (68c7fc2) to head (51f0644).
Report is 1 commits behind head on master.

Files Patch % Lines
...iotdb/confignode/manager/load/cache/LoadCache.java 0.00% 20 Missing ⚠️
...he/iotdb/confignode/conf/ConfigNodeDescriptor.java 0.00% 2 Missing ⚠️
.../iotdb/confignode/conf/ConfigNodeStartupCheck.java 0.00% 2 Missing ⚠️
...onfignode/manager/load/balancer/RouteBalancer.java 0.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master   #12374      +/-   ##
============================================
- Coverage     46.35%   46.34%   -0.02%     
  Complexity       69       69              
============================================
  Files          3380     3381       +1     
  Lines        207893   207902       +9     
  Branches      24970    24972       +2     
============================================
- Hits          96363    96345      -18     
- Misses       111530   111557      +27     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Copy Markdown
Contributor

@OneSizeFitsQuorum OneSizeFitsQuorum left a comment

Choose a reason for hiding this comment

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

LGTM

@sonarqubecloud
Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarCloud

@OneSizeFitsQuorum OneSizeFitsQuorum merged commit 91abf72 into master Apr 19, 2024
@OneSizeFitsQuorum OneSizeFitsQuorum deleted the leader-balance-constraint branch April 19, 2024 05:37
@CRZbulabula CRZbulabula restored the leader-balance-constraint branch April 22, 2024 08:07
@CRZbulabula CRZbulabula deleted the leader-balance-constraint branch April 22, 2024 08:08
HTHou pushed a commit that referenced this pull request Jun 26, 2024
* Finish

* decrease ratis waiting interval
SzyWilliam pushed a commit to SzyWilliam/iotdb that referenced this pull request Nov 26, 2024
* Finish

* decrease ratis waiting interval
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.

2 participants