Skip to content

Better comment about not returning partial batch overlays. #3405

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 4, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,10 @@ public Map<DocumentKey, Overlay> getOverlays(
return result;
}

// Finish batch
// This function should not return partial batch overlays, even if the number of overlays in the
// result set exceeds the given `count` argument. Since the `LIMIT` in the above query might
// result in a partial batch, the following query appends any remaining overlays for the last
// batch.
DocumentKey key = lastOverlay[0].getKey();
String encodedCollectionPath = EncodedPath.encode(key.getCollectionPath());
db.query(
Expand Down