averma21 commented on a change in pull request #338:
URL: https://github.com/apache/jackrabbit-oak/pull/338#discussion_r684007897
##########
File path:
oak-run-commons/src/main/java/org/apache/jackrabbit/oak/index/indexer/document/flatfile/MultithreadedTraverseWithSortStrategy.java
##########
@@ -254,7 +258,9 @@ private void
resumeFromPreviousState(List<LastModifiedRange> previousState,
LastModifiedRange currentRange = previousState.get(i);
LastModifiedRange nextRange = i < previousState.size() - 1 ?
previousState.get(i+1) : null;
if (nextRange != null && currentRange.checkOverlap(nextRange)) {
- throw new IllegalStateException("Range overlap between " +
currentRange + " and " + nextRange);
+ LastModifiedRange merged = currentRange.mergeWith(nextRange);
+ log.info("Range overlap between " + currentRange + " and " +
nextRange + ". Using merged range " + merged);
+ currentRange = merged;
Review comment:
yes, you're right :) This didn't surface up during tests because having
the second range as well was just duplicating the downloads but duplicates are
finally removed while merging.
Fixed the code to skip the next range if merge is done.
--
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]