Caideyipi opened a new pull request, #19197: URL: https://github.com/apache/iotdb/pull/19197
## Description When a DataNode is removed, the SDK retires its connection while the subscription consumer can remain active on other DataNodes. The retired receiver could later time out, unsubscribe all topics and drop the shared consumer, causing that live consumer to lose its subscriptions. Suspend inactivity cleanup while a DataNode is Removing or stopping, and preserve retirement across removal rollback until a new request establishes a fresh local deadline. Connection exit discards the retired receiver's local timeout state. A retirement sequence recorded by the internal status RPC also detects removal and rollback that both occur between receiver callbacks. Explicit consumer close and normal Running/ReadOnly inactivity cleanup remain effective. ## Validation - Spotless apply and `git diff --check` passed. - Targeted unit tests: `SubscriptionReceiverV1Test` (29), `SubscriptionReceiverAgentTest` (15), and `DataNodeInternalRPCServiceImplSetSystemStatusTest` (2); all 46 passed with no failures, errors or skipped tests. - The added regression for removal and rollback between callbacks fails against the previous implementation and passes with this fix. - Multi-node removal/rollback integration tests have not been run for this commit. This PR has: - [x] been self-reviewed, including request/timeout/exit ordering. - [x] added comments explaining the intent of the lifecycle handling. - [x] added unit tests for retirement, rollback, exit ordering and explicit close. ##### Key changed classes - `SubscriptionReceiverV1` - `DataNodeInternalRPCServiceImpl` -- 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]
