Repository navigation
[Subscription] Restore consensus subscription brokers after restart - #18916
Merged
jt2594838 merged 1 commit intoOct 20, 2026
Merged
Conversation
jt2594838
approved these changes
Oct 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
After a full DataNode restart, subscription metadata can be restored before IoTConsensus has any local DataRegions. The initial subscription setup therefore finds no regions. Recovering existing peers did not invoke the callback used to bind subscription queues, leaving the consumer group without a consensus broker even when its consumers reconnected.
Notify the existing peer-availability callback after each recovered peer starts. Keep the pre-start recovery callback ahead of
start()so WAL retention guards are installed first. Share the existing exception handling with peer creation so a failed notification does not prevent other peers from recovering.The existing subscription binding and progress recovery logic is reused. This change does not alter WAL durability or the commit-progress protocol.
Regression coverage
Validation
mvn test -pl iotdb-core/consensus -am -Dtest=IoTConsensusRecoveryTest -Dsurefire.failIfNoSpecifiedTests=false: 2 tests passed, no failures/errors/skips.mvn test-compile -DskipTests -P with-integration-tests: full 54-module reactor passed.mvn test-compile -DskipTests -Dcheckstyle.skip=true -P with-integration-tests,with-zh-locale: full 54-module Chinese reactor passed; Checkstyle was already covered by the English reactor.IoTDBConsensusSubscriptionRecoveryTableIT: passed in 29 seconds in an isolated local 1C1D subscription-enabled runtime assembled from current reactor classes. The standard community runtime disables subscriptions and excludes subscription ITs from normal execution.git diff --checkpassed.This PR has: