Joscorbe commented on code in PR #1824:
URL: https://github.com/apache/jackrabbit-oak/pull/1824#discussion_r1827417413
##########
oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/mongo/MongoVersionGCSupport.java:
##########
@@ -253,9 +253,9 @@ public Iterable<NodeDocument> getModifiedDocs(final long
fromModified, final lon
// (_modified = fromModified && _id > fromId || _modified >
fromModified && _modified < toModified)
final Bson query = or(
withIncludeExcludes(includedPathPrefixes, excludedPathPrefixes,
- and(eq(MODIFIED_IN_SECS,
getModifiedInSecs(fromModified)), gt(ID, fromId))),
+ and(eq(MODIFIED_IN_SECS,
TimeUnit.MILLISECONDS.toSeconds(fromModified)), gt(ID, fromId))),
Review Comment:
I think the fix is ready, I changed some I'm just adding some warnings to
log some edge cases, but the core of the fix should remain the same.
@rishabhdaim I found examples of documents not rounded, and in those cases they
are iterated infinitely (up to 10k times of the while loop) because the second
part of the query returns everything in the 5 second time window, regardless of
any previous progress.
The fix essentially removes the rounding when we are using a fromId, that
means, when the modifiedFrom is taken from an existing document in the
repository. In that case, I think we shouldn't do any rounding and take the
value directly from the document to ensure there is progress.
--
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]