lhotari commented on code in PR #23429:
URL: https://github.com/apache/pulsar/pull/23429#discussion_r1795081751
##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentSubscription.java:
##########
@@ -1253,11 +1253,23 @@ public CompletableFuture<SubscriptionStatsImpl>
getStatsAsync(GetStatsOptions ge
subStats.lastConsumedTimestamp =
Math.max(subStats.lastConsumedTimestamp,
consumerStats.lastConsumedTimestamp);
subStats.lastAckedTimestamp =
Math.max(subStats.lastAckedTimestamp, consumerStats.lastAckedTimestamp);
- if (consumerKeyHashRanges != null &&
consumerKeyHashRanges.containsKey(consumer)) {
- consumerStats.keyHashRanges =
consumerKeyHashRanges.get(consumer).stream()
- .map(Range::toString)
- .collect(Collectors.toList());
+ List<Range> keyRanges = consumerKeyHashRanges != null ?
consumerKeyHashRanges.get(consumer) : null;
+ if (keyRanges != null) {
+ if (((StickyKeyDispatcher) dispatcher).isClassic()) {
Review Comment:
Thanks, The original code was casting in a similar way and I didn't want to
expand the change for a broader refactoring. Skipping for now.
--
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]