uds5501 commented on code in PR #18466:
URL: https://github.com/apache/druid/pull/18466#discussion_r2371059729
##########
indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/common/OrderedSequenceNumber.java:
##########
@@ -98,7 +98,18 @@ public boolean
isAvailableWithEarliest(OrderedSequenceNumber<SequenceOffsetType>
public boolean
isMoreToReadBeforeReadingRecord(OrderedSequenceNumber<SequenceOffsetType> end,
boolean isEndOffsetExclusive)
{
- final int compareToEnd = this.compareTo(end);
- return isEndOffsetExclusive ? compareToEnd < 0 : compareToEnd <= 0;
+ // This happens in the situations where earlier sequences had a different
partition mapping and has now been updated.
+ // Since the end is not defined, we can't really say if there is more to
read or not.
+ try {
+ if (end.sequenceNumber == null) {
+ return false;
+ }
+ final int compareToEnd = this.compareTo(end);
+ return isEndOffsetExclusive ? compareToEnd < 0 : compareToEnd <= 0;
+ }
+ catch (Exception e) {
Review Comment:
Fair enough, we've already handled the end's sequence number to be `null`,
we don't need to capture this exception.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]