VGalaxies commented on code in PR #12647:
URL: https://github.com/apache/iotdb/pull/12647#discussion_r1628781572


##########
iotdb-client/session/src/main/java/org/apache/iotdb/session/subscription/consumer/SubscriptionConsumer.java:
##########
@@ -336,18 +336,23 @@ protected List<SubscriptionMessage> poll(final 
Set<String> topicNames, final lon
             case ERROR:
               final ErrorPayload payload = (ErrorPayload) 
pollResponse.getPayload();
               final String errorMessage = payload.getErrorMessage();
-              final boolean critical = payload.isCritical();
-              LOGGER.warn(
-                  "Error occurred when SubscriptionConsumer {} polling topics 
{}: {}, critical: {}",
-                  this,
-                  topicNames,
-                  errorMessage,
-                  critical);
-              if (critical) {
+              if (payload.isCritical()) {
                 throw new SubscriptionRuntimeCriticalException(errorMessage);
               } else {
                 throw new 
SubscriptionRuntimeNonCriticalException(errorMessage);
               }
+            case TERMINATION:
+              final SubscriptionCommitContext commitContext = 
pollResponse.getCommitContext();
+              final String topicNameToUnsubscribe = 
commitContext.getTopicName();
+              LOGGER.info(
+                  "Termination occurred when SubscriptionConsumer {} polling 
topics {}, unsubscribe topic {} on DN {} automatically",
+                  this,
+                  topicNames,
+                  topicNameToUnsubscribe,
+                  commitContext.getDataNodeId());
+              unsubscribe(topicNameToUnsubscribe);

Review Comment:
   > Okay, checked that there are not.... However there will be a warn log in 
PipeDataNodeRemainingEventAndTimeMetrics#deregister. Can you remove it 
incidentally?
   
   added a boolean return value to `dropPipe`...



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