Skip to content

Commit 69fc54d

Browse files
committed
minor improve
1 parent a4f401d commit 69fc54d

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

iotdb-client/session/src/main/java/org/apache/iotdb/session/subscription/consumer/base/AbstractSubscriptionConsumer.java

+3-6
Original file line numberDiff line numberDiff line change
@@ -975,13 +975,10 @@ private Optional<SubscriptionMessage> pollTabletsInternal(
975975
final List<SubscriptionPollResponse> responses =
976976
pollTabletsInternal(commitContext, nextOffset, timer.remainingMs());
977977

978-
// It's agreed that the server will always return at least one response, even in case of
979-
// failure.
978+
// If responses is empty, it means that some outdated subscription events may be being polled,
979+
// so just return.
980980
if (responses.isEmpty()) {
981-
final String errorMessage =
982-
String.format("SubscriptionConsumer %s poll empty response", this);
983-
LOGGER.warn(errorMessage);
984-
throw new SubscriptionRuntimeNonCriticalException(errorMessage);
981+
return Optional.empty();
985982
}
986983

987984
// only one SubscriptionEvent polled currently

0 commit comments

Comments
 (0)