fivetran-rahulprakash commented on code in PR #3113:
URL: https://github.com/apache/polaris/pull/3113#discussion_r2554824461


##########
polaris-core/src/main/java/org/apache/polaris/core/config/FeatureConfiguration.java:
##########
@@ -438,4 +438,46 @@ public static void enforceFeatureEnabledOrThrow(
               "If set to true (default), allow credential vending for external 
catalogs. Note this requires ALLOW_EXTERNAL_CATALOG_CREDENTIAL_VENDING to be 
true first.")
           .defaultValue(true)
           .buildFeatureConfiguration();
+
+  public static final FeatureConfiguration<Integer> CLOUD_API_TIMEOUT_SECONDS =
+      PolarisConfiguration.<Integer>builder()
+          .key("CLOUD_API_TIMEOUT_SECONDS")
+          .description(
+              "Timeout in seconds for cloud provider API requests. "
+                  + "Prevents indefinite blocking when cloud provider 
endpoints are slow or unresponsive. "
+                  + "Used internally by storage integrations for credential 
vending and other cloud operations. "
+                  + "Currently only used by Azure storage integration (not yet 
implemented for AWS S3 or GCP).")
+          .defaultValue(15)
+          .buildFeatureConfiguration();
+
+  public static final FeatureConfiguration<Integer> CLOUD_API_RETRY_COUNT =
+      PolarisConfiguration.<Integer>builder()
+          .key("CLOUD_API_RETRY_COUNT")
+          .description(
+              "Number of retry attempts for cloud provider API requests. "
+                  + "Uses exponential backoff with jitter to handle transient 
failures. "
+                  + "Currently only used by Azure storage integration (not yet 
implemented for AWS S3 or GCP).")
+          .defaultValue(3)
+          .buildFeatureConfiguration();
+
+  public static final FeatureConfiguration<Integer> 
CLOUD_API_RETRY_DELAY_SECONDS =
+      PolarisConfiguration.<Integer>builder()
+          .key("CLOUD_API_RETRY_DELAY_SECONDS")
+          .description(
+              "Initial delay in seconds before first retry for cloud provider 
API requests. "
+                  + "Delay doubles with each retry (exponential backoff). "
+                  + "Currently only used by Azure storage integration (not yet 
implemented for AWS S3 or GCP).")
+          .defaultValue(2)
+          .buildFeatureConfiguration();
+
+  public static final FeatureConfiguration<Integer> 
CLOUD_API_RETRY_JITTER_MILLIS =

Review Comment:
   I chose to use milliseconds instead of a 0-1 jitter factor for a few reasons:
   
   **User clarity** - It's more intuitive for operators to specify "500 
milliseconds of jitter" rather than understanding what "0.5 jitter factor" 
means (50% of the retry delay)
   **Concrete vs relative** - Millis gives direct control over the maximum 
random delay added, while a factor requires understanding how it interacts with 
the exponential backoff delays
   **Consistency** - All other time-based configs use concrete units 
(seconds/millis) rather than abstract factors
   **Predictability** - With millis, the max jitter is always clear regardless 
of retry delay values
   
   The small conversion cost (jitterMillis / 1000.0) is negligible compared to 
the benefits of making the config more operator friendly. Happy to change to 
0-1 factor if you prefer that approach though!



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