MCPcopy Create free account
hub / github.com/apache/arrow / ResolveRegion

Method ResolveRegion

cpp/src/arrow/filesystem/s3fs.cc:1267–1280  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1265 }
1266
1267 Result<std::string> ResolveRegion(const std::string& bucket) {
1268 std::unique_lock<std::mutex> lock(cache_mutex_);
1269 auto it = cache_.find(bucket);
1270 if (it != cache_.end()) {
1271 return it->second;
1272 }
1273 // Cache miss: do the actual region lookup
1274 lock.unlock();
1275 ARROW_ASSIGN_OR_RAISE(auto region, ResolveRegionUncached(bucket));
1276 lock.lock();
1277 // Note we don't cache a nonexistent bucket, as the bucket could be created later
1278 cache_[bucket] = region;
1279 return region;
1280 }
1281
1282 Result<std::string> ResolveRegionUncached(const std::string& bucket) {
1283 ARROW_ASSIGN_OR_RAISE(auto client_lock, holder_->Lock());

Callers 1

ResolveS3BucketRegionFunction · 0.80

Calls 2

findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected