WJL3333 commented on code in PR #18357:
URL: https://github.com/apache/pulsar/pull/18357#discussion_r1027231563
##########
pulsar-common/src/main/java/org/apache/pulsar/common/util/collections/LongPairRangeSet.java:
##########
@@ -270,14 +305,27 @@ public void forEach(RangeProcessor<T> action) {
}
@Override
- public void forEach(RangeProcessor<T> action, LongPairConsumer<?
extends T> consumer) {
+ public void forEach(RangeProcessor<T> action, LongPairConsumer<?
extends T> outerConsumer) {
for (Range<T> range : asRanges()) {
if (!action.process(range)) {
break;
}
}
}
+ @Override
+ public void forEachRawRange(RawRangeProcessor action) {
+ for (Range<T> range : asRanges()) {
+ LongPair lowerEndpoint =
this.rangeEndPointConsumer.apply(range.lowerEndpoint());
Review Comment:
thanks for review, after check the code, all range is insert by
`LongPairRangeSet.addOpenClosed(long,long,long,long)` i think there is no
chance to get a `Range` which boundary is not set. maybe i missed somewhere,
correct me if im wrong
--
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]