Skip to content

Fix uncaught exception due noexcept tryGetCreateTableQuery()#88105

Merged
azat merged 1 commit intoClickHouse:masterfrom
azat:db-tryGetCreateTableQuery-crash
Oct 7, 2025
Merged

Fix uncaught exception due noexcept tryGetCreateTableQuery()#88105
azat merged 1 commit intoClickHouse:masterfrom
azat:db-tryGetCreateTableQuery-crash

Conversation

@azat
Copy link
Copy Markdown
Member

@azat azat commented Oct 5, 2025

It is possible that some underlying implementation can still throw (from what I read so far it is SQLite and PostgreSQL, later was the real crash which I observed, see referenced issue).

So let's make tryGetCreateTableQuery() suppress only table does not exist exception, and allow any others (from what I read it looks safe to remove "noexcept" from a method).

Changelog category (leave one):

  • Critical Bug Fix (crash, data loss, RBAC) or LOGICAL_ERROR

Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):

Fix possible uncaught exception while reading system.tables with invalid tables in external databases (PostgreSQL/SQLite/...) attached

(Seems that this method marked as noexcept initially in #7512, hence @tavplubix PTAL)

@azat azat requested a review from tavplubix October 5, 2025 14:34
@clickhouse-gh
Copy link
Copy Markdown
Contributor

clickhouse-gh bot commented Oct 5, 2025

Workflow [PR], commit [7ec57e8]

Summary:

job_name test_name status info comment
Finish Workflow failure
python3 ./ci/jobs/scripts/workflow_hooks/new_tests_check.py failure

@clickhouse-gh clickhouse-gh bot added pr-critical-bugfix pr-must-backport Pull request should be backported intentionally. Use this label with great care! pr-must-backport-cloud labels Oct 5, 2025
Copy link
Copy Markdown
Member

@serxa serxa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@serxa serxa self-assigned this Oct 6, 2025
@azat
Copy link
Copy Markdown
Member Author

azat commented Oct 6, 2025

@azat azat closed this Oct 6, 2025
@azat azat reopened this Oct 6, 2025
@azat azat enabled auto-merge October 6, 2025 14:43
@azat azat closed this Oct 6, 2025
auto-merge was automatically disabled October 6, 2025 15:33

Pull request was closed

@azat azat reopened this Oct 6, 2025
@azat azat force-pushed the db-tryGetCreateTableQuery-crash branch 2 times, most recently from fa35728 to be447c6 Compare October 6, 2025 19:18
It is possible that some underlying implementation can still throw (from
what I read so far it is SQLite and PostgreSQL, later was the real crash
which I observed).

So let's make tryGetCreateTableQuery() suppress only table does not
exist exception, and allow any others (from what I read it looks safe to
remove "noexcept" from a method).
@azat azat force-pushed the db-tryGetCreateTableQuery-crash branch from be447c6 to 7ec57e8 Compare October 6, 2025 20:03
@azat azat enabled auto-merge October 7, 2025 06:02
@azat azat added this pull request to the merge queue Oct 7, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Oct 7, 2025
@azat azat added this pull request to the merge queue Oct 7, 2025
Merged via the queue into ClickHouse:master with commit 18cbb74 Oct 7, 2025
121 of 123 checks passed
@azat azat deleted the db-tryGetCreateTableQuery-crash branch October 7, 2025 11:03
@robot-ch-test-poll2 robot-ch-test-poll2 added pr-backports-created-cloud deprecated label, NOOP pr-must-backport-synced The `*-must-backport` labels are synced into the cloud Sync PR labels Oct 7, 2025
robot-clickhouse added a commit that referenced this pull request Oct 7, 2025
Cherry pick #88105 to 25.7: Fix uncaught exception due noexcept tryGetCreateTableQuery()
robot-clickhouse added a commit that referenced this pull request Oct 7, 2025
robot-clickhouse added a commit that referenced this pull request Oct 7, 2025
Cherry pick #88105 to 25.8: Fix uncaught exception due noexcept tryGetCreateTableQuery()
robot-clickhouse added a commit that referenced this pull request Oct 7, 2025
robot-clickhouse added a commit that referenced this pull request Oct 7, 2025
Cherry pick #88105 to 25.9: Fix uncaught exception due noexcept tryGetCreateTableQuery()
robot-clickhouse added a commit that referenced this pull request Oct 7, 2025
@robot-ch-test-poll3 robot-ch-test-poll3 added the pr-synced-to-cloud The PR is synced to the cloud repo label Oct 7, 2025
clickhouse-gh bot added a commit that referenced this pull request Oct 7, 2025
Backport #88105 to 25.9: Fix uncaught exception due noexcept tryGetCreateTableQuery()
clickhouse-gh bot added a commit that referenced this pull request Oct 7, 2025
Backport #88105 to 25.8: Fix uncaught exception due noexcept tryGetCreateTableQuery()
azat added a commit that referenced this pull request Oct 7, 2025
Backport #88105 to 25.7: Fix uncaught exception due noexcept tryGetCreateTableQuery()
robot-ch-test-poll1 added a commit that referenced this pull request Oct 7, 2025
Cherry pick #88105 to 25.3: Fix uncaught exception due noexcept tryGetCreateTableQuery()
robot-clickhouse added a commit that referenced this pull request Oct 7, 2025
@robot-ch-test-poll1 robot-ch-test-poll1 added the pr-backports-created Backport PRs are successfully created, it won't be processed by CI script anymore label Oct 7, 2025
azat added a commit that referenced this pull request Oct 8, 2025
Backport #88105 to 25.3: Fix uncaught exception due noexcept tryGetCreateTableQuery()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-backports-created Backport PRs are successfully created, it won't be processed by CI script anymore pr-backports-created-cloud deprecated label, NOOP pr-critical-bugfix pr-must-backport Pull request should be backported intentionally. Use this label with great care! pr-must-backport-synced The `*-must-backport` labels are synced into the cloud Sync PR pr-synced-to-cloud The PR is synced to the cloud repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants