jt2594838 commented on code in PR #17936:
URL: https://github.com/apache/iotdb/pull/17936#discussion_r3471821377


##########
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:
   Add comments for all defensive logic to avoid confusion.



-- 
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]

Reply via email to