Repository navigation
fix bug in case that rest catalog has wrong auth_header - #96680
Conversation
|
Workflow [PR], commit [465616f] Summary: ❌
|
| try | ||
| { | ||
| iceberg_tables = catalog->getTables(); | ||
| iceberg_tables = getCatalog()->getTables(); |
There was a problem hiding this comment.
Needs the same change in getTablesIterator (which is why the test are failing).
There was a problem hiding this comment.
Also I see multiple other calls to getCatalog() that might have a similar issue and, even worse, that getCatalog() can return nullptr in some situations and we dereference it without any checks
There was a problem hiding this comment.
AFAICT getCatalog() can still return nullptr's, and there are other usages of getCatalog() in this file that might need similar treatment
There was a problem hiding this comment.
I read the code again. and nullptr looks not possible because if it's DatabaseDataLakeCatalogType::NONE, it will throw throw Exception(code: ErrorCodes::BAD_ARGUMENTS, fmt: "Unspecified catalog type"); in getCatalog().
see https://github.com/ClickHouse/ClickHouse/pull/88987/changes#diff-b3d41aa50f5e1e900316e8da7c3eafa738c84d95a52e99c1422844916cf28c12R121
This PR aims to catch the exception from system.tables. for other usage of getCatalog(), I don't know if we should catch the exception.
59e0bfd
Resolve conflicts for the backport of #98827 to 25.8: - Keep only the new `HTTPHeaderFilter.h` include (25.8 has no `FailPoint.h` include here). - `test_database_iceberg`: keep only the new `test_invalid_auth_header_format`, dropping master-only tests. - `test_database_iceberg_nessie_catalog` does not exist in 25.8, keep it deleted. - `03913_datalake_restful_catalog_bad_format`: keep only the forbidden-header check added by this PR. The first half of the master test relies on #96680, which is not in 25.8. Co-Authored-By: Claude Fable 5 <[email protected]>
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
when we create a restful datalake catalog with a invalid auth_header, it will break
system.tables. We should catch this exception.Documentation entry for user-facing changes
Version info
26.2.1.1006