Caideyipi opened a new pull request, #19021: URL: https://github.com/apache/iotdb/pull/19021
## Summary When a DataNode still has non-empty consumer-group metadata but its local subscription broker was removed by inactivity cleanup or a metadata race, the next handshake or metadata push now recreates the broker and repairs consensus subscriptions instead of leaving the provider at broker-missing status 1904. ## Implementation - Added an idempotent `SubscriptionConsumerAgent.ensureConsumerGroupBroker` path serialized by the existing per-consumer-group lock. - Reconcile non-empty metadata during metadata updates and during handshake before activating the consumer. - Reuse `createPipeBrokerIfNotExist` and `setupConsensusSubscriptions`; duplicate brokers and consensus queues are prevented by the existing broker and queue guards. - Keep empty `ConsumerGroupMeta` empty. A group cleared before a later handshake is not guessed back into its previous topics; explicit subscription metadata remains authoritative. - Preserve existing brokers and queues during provider replacement. Provider replacement continues to close only the client session, with no subscription CLOSE request and no commit replay. ## Tests - Added focused DataNode tests for broker recreation, empty metadata, handshake/metadata concurrency, canceled topics, and preservation of an existing broker queue. - `mvn spotless:apply -P with-integration-tests -pl iotdb-core/datanode` passed. - Focused Maven tests did not reach Surefire. The first run failed because the Windows JVM could not reserve the configured test heap; a bounded `-DforkCount=0` retry failed in the Maven Checkstyle phase for the same system commit-memory limitation. - English and `with-zh-locale` incremental compiles reached javac but were blocked by pre-existing generated-source and dependency inconsistencies (`IFill`/`IFillFilter`/`LinearFill`, `commons-collections4`, and unrelated pipe/query API mismatches). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
