Caideyipi opened a new pull request, #18465:
URL: https://github.com/apache/iotdb/pull/18465
## Description
When `subscription_enabled=false`, avoid initializing or running DataNode
subscription runtime components:
- Skip registration of the Subscription Runtime Agent service.
- Do not schedule the subscription receiver timeout checker.
- Return successful no-op responses for subscription progress/runtime RPCs.
- Keep updating the normal region cache while skipping subscription route
callbacks.
- Avoid accessing the subscription receiver on ordinary client disconnects.
- Defensively ignore runtime-state updates in
`ConsensusSubscriptionSetupHandler`.
This removes the misleading runtime-service startup log, the
`SubscriptionReceiverAgent-Timeout-Checker` thread, and subscription
runtime-state logs while subscription is disabled.
## Tests
- `mvn -o -nsu validate -pl iotdb-core/datanode`
- `mvn -nsu -pl iotdb-core/datanode -am test
-Dtest=SubscriptionReceiverAgentTest,ConsensusSubscriptionSetupHandlerTest,DataNodeInternalRPCServiceImplSubscriptionDisabledTest
-Dsurefire.failIfNoSpecifiedTests=false -DfailIfNoTests=false`
- 12 tests passed in a clean worktree.
<hr>
This PR has:
- [x] been self-reviewed.
- [x] added unit tests or modified existing tests to cover new code paths,
ensuring the threshold for code coverage.
<hr>
##### Key changed/added classes (or packages if there are too many classes)
in this PR
- `DataNode`
- `ClientRPCServiceImpl`
- `DataNodeInternalRPCServiceImpl`
- `SubscriptionReceiverAgent`
- `ConsensusSubscriptionSetupHandler`
--
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]