Caideyipi opened a new pull request, #18397:
URL: https://github.com/apache/iotdb/pull/18397
## 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`
<hr>
This PR has:
- [x] been self-reviewed.
- [x] concurrent read
- [x] concurrent write
- [x] concurrent read and write
- [x] added comments explaining the why and intent where model qualification
is not obvious.
- [x] added unit tests or modified existing tests to cover new code paths.
- [x] added integration tests.
- [x] been tested in a test IoTDB cluster.
<hr>
##### 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`
--
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]