Skip to content

Remove IoTConsensus auto leader balance toggle#17950

Merged
JackieTien97 merged 1 commit into
masterfrom
fix-region-allocation-it-timeout
Jun 16, 2026
Merged

Remove IoTConsensus auto leader balance toggle#17950
JackieTien97 merged 1 commit into
masterfrom
fix-region-allocation-it-timeout

Conversation

@CRZbulabula

@CRZbulabula CRZbulabula commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Description

Remove the enable_auto_leader_balance_for_iot_consensus configuration option and its test-environment setter APIs.

IoTConsensus and IoTConsensusV2 RegionGroups now always participate in ConfigNode leader balancing. This matches the previous default behavior and avoids the invalid opt-out case where newly created IoTConsensus RegionGroups could remain with leaderId=-1 until CreateRegionGroupsProcedure waited close to the procedure timeout. In the per-database allocation IT, that could surface as CREATE_REGION_ERROR under the GCR policy even though all replicas had been created successfully.

The Ratis auto leader balance toggle is left unchanged.

This patch also keeps the DataPartition creation assertion in IoTDBPerDatabaseRegionGroupAllocationIT more diagnostic by including the returned TSStatus in the failure message.

Tests

  • mvn spotless:apply -pl iotdb-core/confignode,iotdb-core/node-commons,integration-test -P with-integration-tests
  • mvn verify -Drat.skip=true -DskipUTs -Dit.test=IoTDBPerDatabaseRegionGroupAllocationIT,IoTDBRegionGroupLeaderDistributionIT,IoTDBMultiDBRegionGroupLeaderDistributionIT -DfailIfNoTests=false -Dfailsafe.failIfNoSpecifiedTests=false -pl integration-test -am -PClusterIT -P with-integration-tests

Note: local full RAT validation is blocked by an unrelated .claude/scheduled_tasks.lock file in the working tree, so the focused IT verification used -Drat.skip=true.

@CRZbulabula CRZbulabula force-pushed the fix-region-allocation-it-timeout branch from 39f89f5 to dc4493b Compare June 16, 2026 07:53
@CRZbulabula CRZbulabula changed the title Fix per-database region allocation IT timeout Remove IoTConsensus auto leader balance toggle Jun 16, 2026
@sonarqubecloud

Copy link
Copy Markdown

@codecov

codecov Bot commented Jun 16, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 33.33333% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 41.15%. Comparing base (8fad784) to head (dc4493b).
⚠️ Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
...onfignode/manager/load/balancer/RouteBalancer.java 33.33% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master   #17950      +/-   ##
============================================
- Coverage     41.15%   41.15%   -0.01%     
  Complexity      318      318              
============================================
  Files          5258     5258              
  Lines        365613   365602      -11     
  Branches      47282    47279       -3     
============================================
- Hits         150460   150451       -9     
+ Misses       215153   215151       -2     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@JackieTien97 JackieTien97 merged commit b9d3dbe into master Jun 16, 2026
43 checks passed
@JackieTien97 JackieTien97 deleted the fix-region-allocation-it-timeout branch June 16, 2026 08:42
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