aiborodin opened a new pull request, #18538: URL: https://github.com/apache/iceberg/pull/18538
`JdbcTableOperations` and `JdbcViewOperations` refresh metadata with `refreshFromMetadataLocation(newLocation)`, which retries reading the metadata file 20 times for up to 10 minutes. When the object store is reachable but unhealthy, for example when reads time out, a single `loadTable` blocks for up to 10 minutes before it fails. In a REST catalog server backed by `JdbcCatalog`, this holds a request thread for the whole time, while clients usually give up much earlier. This is similar to #3379, which made the number of metadata refresh retries configurable for `HiveTableOperations` (`iceberg.hive.metadata-refresh-max-retries`). Changes: - Add the `metadata-refresh.max-retries` property to `CatalogProperties`. The default is 20, so behavior doesn't change. - `JdbcTableOperations` and `JdbcViewOperations` read the property from the catalog properties, reject negative values, and pass it to the existing `refreshFromMetadataLocation` overloads. - Document the property for the JDBC catalog. The property is in `CatalogProperties` rather than prefixed with `jdbc.`, following the review feedback in #10002 that this setting shouldn't be specific to one catalog. Other catalogs can read it the same way. It is still only wired up for JDBC to keep this PR small. Earlier attempts were #5688 and #10002. Each retry is a full metadata read, so the total time also depends on the FileIO's own timeouts and retries (for example `s3.retry.num-retries` and `http-client.apache.socket-timeout-ms` for `S3FileIO`). With those bounded, this property bounds the total time of a refresh. Testing: new tests in `TestJdbcCatalog` and `TestJdbcViewCatalog` check that a refresh makes `max-retries + 1` reads and that negative values are rejected. I ran the JDBC test suites, Spotless, checkstyle and revapi for `iceberg-core` locally. I wrote this change with the help of an AI coding assistant (Claude Code), and I reviewed the design and the code and ran the tests myself. 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- 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]
