Caideyipi opened a new pull request, #18804: URL: https://github.com/apache/iotdb/pull/18804
## Description Unsubscribing a consensus based topic can time out when queue close waits for an active prefetch read lock or consensus queue deregistration. Broker teardown now fences new queue work immediately and completes blocking cleanup on the close executor. Uncommitted lingering tablets are discarded during close so a later queue can replay them from WAL. Prefetch task deregistration checks the task instance, preventing delayed cleanup of an old queue from removing a replacement task. ## Verification - `mvn -o -pl iotdb-core/datanode spotless:check` passed. - English locale DataNode main and test sources compiled in the 28 module reactor. - `mvn -o -pl iotdb-core/datanode -am -P with-zh-locale -DskipTests test-compile` passed. - The four new `ConsensusPrefetchingQueueTest` methods passed via `mvn -o -pl iotdb-core/datanode -Dtest=ConsensusPrefetchingQueueTest#... surefire:test`. - A forced run of the full class had 37 passes and 6 failures in existing tests that use the default subscription memory budget. `CommonConfig.SUBSCRIPTION_ENABLED=false` makes that budget zero in this checkout. The repository's normal Surefire configuration excludes subscription unit tests. ## Review - [x] Reviewed close and rebind races. - [x] Added regression tests for blocked cleanup and replacement task registration. Key changed classes: `ConsensusSubscriptionBroker`, `ConsensusPrefetchingQueue`, `ConsensusSubscriptionPrefetchExecutor`, and `ConsensusPrefetchSubtask`. -- 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]
