VGalaxies commented on code in PR #12647:
URL: https://github.com/apache/iotdb/pull/12647#discussion_r1628756580
##########
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:
In DropPipeProcedureV2, no exception will be occurred even if the pipe does
not exist...
--
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]