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


##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/agent/SubscriptionBrokerAgent.java:
##########
@@ -660,17 +665,24 @@ public void refreshConsensusQueueOrderMode(final String 
topicName, final String
   public void refreshColumnFilter(final String topicName, final TopicConfig 
topicConfig) {
     final ColumnFilterMatcher matcher;
     try {
+      final Map<String, Map<String, TsTable>> bindingTables =
+          getColumnFilterBindingTables(topicConfig);
+      if (Objects.isNull(bindingTables)) {
+        topicNameToColumnFilterMatcher.remove(topicName);
+        LOGGER.info(
+            "SubscriptionBrokerAgent: postpone refreshing column-filter 
matcher for topic [{}] because its table schema is not available locally",
+            topicName);

Review Comment:
   Fixed in 886ec2c98d4. The schema-unavailable column-filter matcher log now 
uses DataNodeMiscMessages, with both en and zh entries added.



##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/subscription/agent/SubscriptionBrokerAgent.java:
##########
@@ -660,17 +665,24 @@ public void refreshConsensusQueueOrderMode(final String 
topicName, final String
   public void refreshColumnFilter(final String topicName, final TopicConfig 
topicConfig) {
     final ColumnFilterMatcher matcher;
     try {
+      final Map<String, Map<String, TsTable>> bindingTables =
+          getColumnFilterBindingTables(topicConfig);
+      if (Objects.isNull(bindingTables)) {
+        topicNameToColumnFilterMatcher.remove(topicName);
+        LOGGER.info(
+            "SubscriptionBrokerAgent: postpone refreshing column-filter 
matcher for topic [{}] because its table schema is not available locally",
+            topicName);
+        return;
+      }
       matcher =
           ColumnFilterMatcher.fromBoundColumnFilter(
-              columnFilterBinder.bind(
-                  topicConfig, 
DataNodeTableCache.getInstance().getTableSnapshot()));
+              columnFilterBinder.bind(topicConfig, bindingTables));
     } catch (final Exception e) {
       LOGGER.warn(
           "SubscriptionBrokerAgent: failed to refresh column-filter matcher 
for topic [{}], use empty matcher to fail closed",
           topicName,
           e);

Review Comment:
   Fixed in 886ec2c98d4. The refresh-failure column-filter matcher log now uses 
DataNodeMiscMessages, and I moved the related success/lazy-refresh/drop matcher 
logs to the same i18n constants as well.



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