github-actions[bot] commented on code in PR #68613:
URL: https://github.com/apache/doris/pull/68613#discussion_r4131385630


##########
thirdparty/patches/lance-c-foyer.patch:
##########
@@ -1087,24 +941,35 @@ index 0000000..9a10e43
 +    }
 +
 +    async fn cached_get(&self, location: &Path, options: GetOptions) -> 
Result<GetResult> {
-+        // Fetch metadata separately so the returned GetResult retains the 
origin's identity while
-+        // its payload uses the same block cache as get_ranges(). This also 
provides the object size
-+        // needed to resolve bounded, offset, and suffix ranges.
-+        let GetResult {
-+            meta: metadata,
-+            attributes,
-+            ..
-+        } = self
++        let metadata_key = self
 +            .reader
-+            .original
-+            .get_opts(
-+                location,
-+                GetOptions {
-+                    head: true,
-+                    ..Default::default()
-+                },
-+            )
-+            .await?;
++            .cache
++            .size_key(&self.reader.store_prefix, location);
++        let cached_metadata = self.reader.cache.metadata.get(&metadata_key);

Review Comment:
   [P2] Keep cached metadata scoped to the physical object store
   
   A shared session can open `s3://bucket/table.lance` with two S3-compatible 
`endpoint` options. Lance creates distinct underlying stores, but passes 
`s3$bucket` as the prefix for both cache keys. For a normal data file whose 
size is in the manifest, the scan reaches this metadata hit without an earlier 
HEAD: after endpoint A warms `data/f.lance`, endpoint B can return A's 
size/ETag and cached bytes even if B lacks the object. Previously `cached_get` 
issued B's HEAD and failed. Include the effective backend identity in metadata 
and block keys, or keep an origin check when stores cannot be distinguished; 
cover two endpoints sharing a bucket/path.



-- 
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]

Reply via email to