Fokko commented on code in PR #3418:
URL: https://github.com/apache/iceberg-python/pull/3418#discussion_r3922114950


##########
mkdocs/docs/configuration.md:
##########
@@ -348,6 +348,31 @@ catalog:
 | snapshot-loading-mode | refs                           | The snapshots to 
return in the body of the metadata. Setting the value to `all` would return the 
full set of snapshots currently valid for the table. Setting the value to 
`refs` would load all snapshots referenced by branches or tags. |
 | `header.X-Iceberg-Access-Delegation` | `vended-credentials` | Signal to the 
server that the client supports delegated access via a comma-separated list of 
access mechanisms. The server may choose to supply access via any or none of 
the requested mechanisms. When using `vended-credentials`, the server provides 
temporary credentials to the client. When using `remote-signing`, the server 
signs requests on behalf of the client. (default: `vended-credentials`) |
 
+#### Retry and timeout
+
+The REST Catalog uses `requests` with no retries and no timeout by default, so 
transient
+5xx / network failures bubble up immediately and slow servers can hang the 
client indefinitely.
+Set a `connection:` block on the catalog to opt in to a per-request timeout 
and a retry policy.
+
+```yaml
+catalog:
+  default:
+    uri: http://rest-catalog/ws/
+    connection:
+      timeout: 60          # seconds, applied to every HTTP call
+      retries: 5           # number of retry attempts on transient failures
+      backoff-factor: 1.0  # exponential backoff between retries
+```
+
+| Key                          | Example  | Description                        
                                                                                
|
+| ---------------------------- | -------- | 
------------------------------------------------------------------------------------------------------------------
 |
+| connection.timeout           | 60       | Per-request timeout in seconds. 
Must be a positive number.                                                      
   |
+| connection.retries           | 5        | Number of retry attempts for 
transient failures. Must be non-negative.                                       
      |
+| connection.backoff-factor    | 1.0      | Backoff factor between retry 
attempts. Must be non-negative. See [`urllib3` Retry 
docs](https://urllib3.readthedocs.io/en/latest/reference/urllib3.util.html#urllib3.util.Retry)
 for the formula. |
+
+Retries are applied to idempotent methods only (`GET`, `HEAD`, `OPTIONS`) and 
to the

Review Comment:
   I would consider PUT and DELETE as idempotent as well.



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

Reply via email to