Fix IPartitionStrategy race condition#1517
Conversation
|
@codex review |
|
Codex Review: Didn't find any major issues. Keep it up! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
…trategy Fix IPartitionStrategy race condition
|
|
AI audit note: This review comment was generated by AI (gpt-5.3-codex). Audit update for PR #1517 (Fix IPartitionStrategy race condition): Confirmed defects: No confirmed defects in reviewed scope. |
PR #1517 CI Triage — Fix IPartitionStrategy race condition
PR DescriptionBug fix for a race condition in Changed files (6):
Summary
Verdict: No failures are caused by this PR. All CI failures are pre-existing or infrastructure-related. PR-targeted regression suites both passed: CI Jobs Status
Detailed Failure Analysis1.
|
| Job | Started | Cancelled |
|---|---|---|
| alter_attach_partition_2 | 13:30:07 | 16:35:07 |
| alter_replace_partition | 13:31:28 | 16:36:28 |
| alter_attach_partition_1 | 13:33:04 | 16:38:05 |
| aggregate_functions_2 | ~13:30 | ~16:35 |
| rbac_2, rbac_3 | ~13:30 | ~16:35 |
| iceberg_1, iceberg_2 | ~13:30 | ~16:35 |
| tiered_storage_gcs | ~13:30 | ~16:35 |
| lightweight_delete | ~13:30 | ~16:35 |
| parquet | ~13:30 | ~16:35 |
These suites commonly take >3h on single-threaded --parallel 1 keeper+analyzer runs. The timeouts are not related to PR changes.
PR-Targeted Regression Suites
The regression suites most directly relevant to the IPartitionStrategy race condition fix both passed:
| Suite | Status | Details |
|---|---|---|
| s3_minio_export_partition | ✅ success | Export partition suite — directly tests the fixed code path |
| s3_minio_export_part | ✅ success | Export part suite — tests MergeTree part export to S3 |
IPartitionStrategy::computePartitionKey might be called from different threads, and it writes to cached_result concurrently without any sort of protection. It would be easier to add a mutex around it, but we can actually make it lock-free by moving the cache write to the constructor.
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Fix race condition on
IPartitionStrategyfound in https://altinity-build-artifacts.s3.amazonaws.com/json.html?PR=1463&sha=5e3b05142815f9d4dbbb89497badc85d455079e4&name_0=PR&name_1=Stateless+tests+%28amd_tsan%2C+s3+storage%2C+sequential%2C+2%2F2%29&name_2=Tests.This was introduced in ClickHouse#92844, I'll ship a PR to upstream as well
Documentation entry for user-facing changes
...
CI/CD Options
Exclude tests:
Regression jobs to run: