FrankChen021 commented on code in PR #19693:
URL: https://github.com/apache/druid/pull/19693#discussion_r3595288389
##########
processing/src/main/java/org/apache/druid/segment/file/PartialSegmentFileMapperV10.java:
##########
@@ -458,7 +465,16 @@ public ByteBuffer mapFile(String name) throws IOException
return null;
}
- ensureFileDownloaded(name, fileMetadata);
+ // Mapping never downloads, every caller is expected to have made the file
resident through an explicit plan before
+ // reading it
+ if (!downloadedFiles.contains(name)) {
Review Comment:
[P1] Acquire bundle holds before planning resident files
`makeCursorHolderAsync` snapshots residency in `planCursorPrefetch` before
acquiring the corresponding bundle holds. If a resident, currently unheld
bundle is evicted in that window, `evictContainer` clears its downloaded-file
entries and the subsequent acquire only remounts sparse containers; files
omitted from the original plan are never restored. This new exception then
makes holder materialization fail, whereas the removed `ensureFileDownloaded`
path recovered under the hold. Acquire bundle holds before the residency
snapshot, or re-plan the fetches after all holds are acquired.
--
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]