JingsongLi commented on code in PR #9642:
URL: https://github.com/apache/paimon/pull/9642#discussion_r3975883703
##########
paimon-common/src/main/java/org/apache/paimon/fs/cache/CachingFileIO.java:
##########
@@ -137,12 +137,16 @@ public SeekableInputStream newInputStream(Path path)
throws IOException {
if (c == null) {
return delegate.newInputStream(path);
}
+ FileStatus status = delegate.getFileStatus(path);
Review Comment:
[P2] Preserve the immutable memory-cache fast path. Moving getFileStatus
outside the disk-only branch adds a storage metadata request to every
memory-cache open, including immutable snapshot/manifest/global-index cache
hits. An isolated base/head probe reading one immutable snapshot ten times
performs 1 status lookup before this change and 10 afterward. On object
storage, otherwise local hits now require a metadata round trip. Please handle
the mutable paths separately instead of applying this cost to every cached
file, and add a regression assertion that repeated immutable cache hits do not
repeatedly stat the delegate.
--
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]