Caideyipi commented on code in PR #17936:
URL: https://github.com/apache/iotdb/pull/17936#discussion_r3478672013
##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/agent/SubscriptionTopicAgent.java:
##########
@@ -93,14 +94,62 @@ public TPushTopicMetaRespExceptionMessage
handleSingleTopicMetaChanges(
private void handleSingleTopicMetaChangesInternal(final TopicMeta
metaFromCoordinator) {
final String topicName = metaFromCoordinator.getTopicName();
- TopicMeta.validateOwnerProgression(
- topicMetaKeeper.getTopicMeta(topicName), metaFromCoordinator);
+ final TopicMeta oldMeta = topicMetaKeeper.getTopicMeta(topicName);
+ TopicMeta.validateOwnerProgression(oldMeta, metaFromCoordinator);
topicMetaKeeper.removeTopicMeta(topicName);
topicMetaKeeper.addTopicMeta(topicName, metaFromCoordinator);
+ if (shouldRefreshColumnFilter(oldMeta, metaFromCoordinator)) {
+ SubscriptionAgent.broker().refreshColumnFilter(topicName,
metaFromCoordinator.getConfig());
+ } else if (!metaFromCoordinator.getConfig().isTableTopic()) {
+ SubscriptionAgent.broker().dropColumnFilter(topicName);
+ }
Review Comment:
Added comments around the defensive DataNode-side drop. The comment now
explains that ConfigNode rejects column-filter on tree topics and this branch
is for stale or replayed metadata after table-topic to tree-topic transitions.
##########
iotdb-core/relational-grammar/src/main/antlr4/org/apache/iotdb/db/relational/grammar/sql/SubscriptionColumnFilter.g4:
##########
Review Comment:
Done. Renamed the grammar to SubscriptionColumnFilter, including the file
name, grammar name, root rule, and generated-parser references used by the
subscription facade.
--
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]