felipecrv commented on code in PR #39298:
URL: https://github.com/apache/arrow/pull/39298#discussion_r1432065685
##########
cpp/src/arrow/filesystem/azurefs.cc:
##########
@@ -798,7 +864,7 @@ class AzureFileSystem::Impl {
std::unique_ptr<DataLake::DataLakeServiceClient> datalake_service_client_;
std::unique_ptr<Blobs::BlobServiceClient> blob_service_client_;
- internal::HierarchicalNamespaceDetector hns_detector_;
+ HNSSupport cached_hns_support_ = HNSSupport::kUnknown;
Review Comment:
An operation could decide to use the `DataLakeFileSystemClient` if
`cached_hns_support` in `kUnknown/kContainerNotFound/kEnabled` and set the
value of `cached_hns_support_` based on the error/success handling of that
operation. This would save the mandatory extra request in the uncached case.
Another scenario is if we were to add threads to the mix, we would like to
avoid having multiple HNS check requests going in parallel by having
`cached_hns_support_` be some kind of atomic variable or protected by a mutex
that also protects other member variables in the `AzureFileSystem::Impl` class.
--
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]