Skip to content

[Subscription] Skip runtime when subscription is disabled - #18465

Open
Caideyipi wants to merge 1 commit into
apache:masterfrom
Caideyipi:fix/subscription-disabled-runtime
Open

[Subscription] Skip runtime when subscription is disabled#18465
Caideyipi wants to merge 1 commit into
apache:masterfrom
Caideyipi:fix/subscription-disabled-runtime

Conversation

@Caideyipi

Copy link
Copy Markdown
Collaborator

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.

This PR has:

  • been self-reviewed.
  • added unit tests or modified existing tests to cover new code paths, ensuring the threshold for code coverage.

Key changed/added classes (or packages if there are too many classes) in this PR
  • DataNode
  • ClientRPCServiceImpl
  • DataNodeInternalRPCServiceImpl
  • SubscriptionReceiverAgent
  • ConsensusSubscriptionSetupHandler

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant