OIiveirra commented on code in PR #69528:
URL: https://github.com/apache/doris/pull/69528#discussion_r4371828806
##########
be/src/format_v2/table/lance_reader.cpp:
##########
@@ -628,6 +887,10 @@ Status LanceTableReader::_ensure_dataset_open(const
TFileRangeDesc& range,
} else if (!_opened_dataset_key.has_value() || *_opened_dataset_key !=
key) {
return Status::InvalidArgument(
"Lance reader cannot mix dataset snapshots or storage
options");
+ } else {
+ // Revalidate reused handles before scanners, indexes or row-id reads.
Fresh handles
+ // are checked inside _open_dataset before they become reader state.
+ RETURN_IF_ERROR(_validate_dataset_storage(_dataset,
key.storage_policy));
Review Comment:
Fixed in 4fadc819b29d2af9da19a23f983e70a3655421e0. Successful REMOTE storage
admission is now reused for the same opened handle and complete DatasetKey. The
pinned SDK exposes registered bases from the immutable opened snapshot;
_open_dataset still validates all bases before publishing the handle. A changed
URI, version, storage options or policy still fails the existing key
comparison. LOCAL handles continue revalidating paths and registered bases on
every reuse because filesystem paths and links can change. No new cache state
or SDK interface was added.
All 31 selected Clang21/ASAN filesystem and Lance tests passed with fresh
XML and frozen sources. Coverage includes reusing a LOCAL handle after
narrowing its secure root around a registered sibling base, initial REMOTE
rejection of a local primary before handle publication, snapshot/key checks,
multiple fragment splits and row-id materialization. Changed C++ ranges pass
clang-format16. No live S3 throughput benchmark is claimed.
--
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]