Skip to content

fix: unique ClickHouse temp table names instead of tempTableMu - #10036

Merged
k-anshul merged 1 commit into
mainfrom
anshul/clickhouse-unique-temp-tables
Oct 19, 2026
Merged

k-anshul merged 1 commit into
mainfrom
anshul/clickhouse-unique-temp-tables

Conversation

@k-anshul

@k-anshul k-anshul commented Oct 19, 2026 •

Copy link
Copy Markdown
Member
  • Temp tables get a <unixmillis>_<random> suffix instead of an md5 of the SQL, so concurrent partitions and the stale table sweep never touch the same table.
  • Removes tempTableMu.
  • Drops the staging table after a failed create with a minimum duration, so cleanup still runs on ctx cancellation.

Follow-up to #10025.

Checklist:

  • Covered by tests
  • Ran it and it works as intended
  • Reviewed the diff before requesting a review
  • Checked for unhandled edge cases
  • Linked the issues it closes
  • Checked if the docs need to be updated. If so, create a separate Linear DOCS issue
  • Intend to cherry-pick into the release branch
  • I'm proud of this work!

Developed in collaboration with Claude Code

Temp tables now get a unix millis and random suffix, so concurrent partitions and the stale table sweep never operate on the same table.
This removes `tempTableMu`, which only covered a single process.

Also give the staging table drop after a failed create a minimum duration, so it still runs when the ctx is cancelled.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@k-anshul k-anshul self-assigned this Oct 19, 2026
@k-anshul
k-anshul merged commit ab70e38 into main Oct 19, 2026
15 of 16 checks passed
@k-anshul
k-anshul deleted the anshul/clickhouse-unique-temp-tables branch October 19, 2026 13:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants