tustvold commented on code in PR #4928:
URL: https://github.com/apache/arrow-rs/pull/4928#discussion_r1358111402


##########
object_store/src/client/mod.rs:
##########
@@ -444,7 +473,19 @@ impl ClientOptions {
         }
     }
 
-    pub(crate) fn client(&self) -> super::Result<Client> {
+    /// Create a [`Client`] with overrides optimised for metadata endpoint 
access
+    ///
+    /// In particular:
+    /// * Allows HTTP as metadata endpoints do not use TLS
+    /// * Configures a low connection timeout to provide quick feedback if not 
present
+    pub(crate) fn metadata_client(&self) -> Result<Client> {
+        self.clone()
+            .with_allow_http(true)
+            .with_connect_timeout(Duration::from_secs(1))

Review Comment:
   This will help new users who may use the crate without configuring any 
credentials, which will then default to the metadata credentials, which will 
then hang indefinitely trying to get credentials from a non-existent metadata 
endpoint



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

Reply via email to