Skip to content

[Subscription] Isolate tree and table topics - #18397

Merged
jt2594838 merged 2 commits into
apache:masterfrom
Caideyipi:topic-tree-table-isolation
Aug 6, 2026
Merged

[Subscription] Isolate tree and table topics#18397
jt2594838 merged 2 commits into
apache:masterfrom
Caideyipi:topic-tree-table-isolation

Conversation

@Caideyipi

Copy link
Copy Markdown
Collaborator

Description

Tree/table Topic metadata isolation

  • Qualify Topic metadata with the data model so tree and table Topics with the same name can coexist.
  • Keep snapshot and user-facing Topic names unchanged while using model-qualified internal keys.
  • Propagate the model through ConfigNode plans/procedures and DataNode Topic metadata, broker, consensus queue, column filter, and owner lease paths.

Subscription isolation and compatibility

  • Resolve CREATE, ALTER, DROP, SHOW, SUBSCRIBE, and UNSUBSCRIBE against the requested model.
  • Filter subscription metadata by the consumer group SQL dialect.
  • Reject mixed tree/table consumers in one consumer group because its subscription map is keyed by Topic name.
  • Keep legacy DropTopic plan/procedure and Thrift payload deserialization compatible when the model field is absent.

Tests

  • Add TopicMetaKeeper same-name and snapshot coverage.
  • Add ConfigNode plan/procedure and subscription metadata coverage.
  • Enable and update IoTDBSubscriptionIsolationIT to cover same-name tree/table Topic CREATE, ALTER, SHOW, DROP, SUBSCRIBE, and UNSUBSCRIBE.

Test Plan

  • mvn spotless:apply -pl iotdb-core/node-commons,iotdb-core/confignode,iotdb-core/datanode
  • mvn -o -nsu test -pl iotdb-core/node-commons -Dtest=ConsumerGroupDeSerTest,TopicMetaKeeperTest
  • mvn -o -nsu test -pl iotdb-core/confignode -Dtest=DropTopicProcedureTest
  • mvn -o -nsu test-compile -pl iotdb-core/node-commons,iotdb-core/datanode -DskipTests
  • mvn -o -nsu test -pl iotdb-core/node-commons,iotdb-core/datanode -Dtest=SubscriptionTopicAgentTest,SubscriptionReceiverV1Test -Dsurefire.failIfNoSpecifiedTests=false
  • mvn -o -nsu verify -DskipUTs -Dit.test=IoTDBSubscriptionIsolationIT -DfailIfNoTests=false -Dfailsafe.failIfNoSpecifiedTests=false -Drat.skip=true -pl integration-test -am -P with-integration-tests

This PR has:

  • been self-reviewed.
    • concurrent read
    • concurrent write
    • concurrent read and write
  • added comments explaining the why and intent where model qualification is not obvious.
  • added unit tests or modified existing tests to cover new code paths.
  • added integration tests.
  • been tested in a test IoTDB cluster.

Key changed/added classes or packages in this PR
  • TopicMetaKeeper, ConsumerGroupMeta, and ConsumerGroupMetaKeeper
  • ConfigNode subscription coordinator, persistence, plans, and procedures
  • DataNode subscription Topic, consumer, broker, receiver, and consensus paths
  • datanode.thrift
  • IoTDBSubscriptionIsolationIT

@jt2594838
jt2594838 merged commit ec473f7 into apache:masterAug 6, 2026
41 checks passed
@jt2594838
jt2594838 deleted the topic-tree-table-isolation branch August 6, 2026 10:47
Sign up for freeto 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.

2 participants

@Caideyipi@jt2594838