MisterRaindrop commented on code in PR #889:
URL: https://github.com/apache/iceberg-cpp/pull/889#discussion_r3794340505
##########
src/iceberg/resolving_file_io.cc:
##########
@@ -32,33 +35,22 @@
ResolvingFileIO::ResolvingFileIO(std::unordered_map<std::string, std::string> pr
ResolvingFileIO::~ResolvingFileIO() = default;
-Result<std::string_view> ResolveFileIOName(std::string_view location) {
- const auto pos = location.find("://");
- if (pos == std::string_view::npos) {
- return FileIORegistry::kArrowLocalFileIO;
- }
+Result<std::shared_ptr<FileIO>> ResolvingFileIO::FileIOForPath(
+ std::string_view location) {
+ const auto scheme =
StringUtils::ToLower(LocationUtil::ParseScheme(location));
+ ICEBERG_ASSIGN_OR_RAISE(const auto name, FileIORegistry::Resolve(scheme));
Review Comment:
ResolvingFileIO does not have a bound stable registry snapshot therefore,
the parsing results returned by FileIO may be affected by the process-wide
mutable registry ?
example:
Step 1: A(s3) Registration
Step 2: Resolver resolves s3 -> A
Time 3: A is replaced by a record with the same name.
Result: Resolver still hit an old cache entry named "A".
I just feel maybe there is this kind of problem.
--
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]