Skip to content

Fix flakiness due to ColumnTuple test leaking MainThreadStatus - #106895

Merged
arsenmuk merged 1 commit into
masterfrom
arsenmuk/fix-columntuple-leaking
Jun 10, 2026
Merged

arsenmuk merged 1 commit into
masterfrom
arsenmuk/fix-columntuple-leaking

Conversation

@arsenmuk

@arsenmuk arsenmuk commented Jun 9, 2026 •

Copy link
Copy Markdown
Member

Changelog category (leave one):

  • CI Fix or Improvement (changelog entry is not required)

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

ColumnTuple.InsertDefaultIsExceptionSafe calls MainThreadStatus::getInstance() — a process-lifetime singleton that permanently redirects ProfileEvents::increment to thread-local counters. This breaks other tests relying on global_counters.

Fix: scoped ThreadStatus instead of singleton.

Related: #106802

@clickhouse-gh

clickhouse-gh Bot commented Jun 9, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [6d01dc7]

Summary: ❌

job_name test_name status info comment
Stateless tests (arm_asan_ubsan, azure, parallel) FAIL
03634_autopr_input_bytes_estimation FAIL cidb, issue ISSUE CREATED
00162_mmap_compression_none FAIL cidb, issue ISSUE CREATED

AI Review

Summary

This PR stops ColumnTuple.InsertDefaultIsExceptionSafe from creating the process-lifetime MainThreadStatus singleton and uses a scoped ThreadStatus while clamping total_memory_tracker. The change preserves the memory-limit path used by the test because a default thread MemoryTracker propagates to total_memory_tracker, and I found no current-code issue that needs an inline review comment.

Missing context / blind spots
  • ⚠️ The Praktika PR report for 6d01dc7f currently has zero test rows and GitHub still shows Fast test and PR pending; I could not verify the adjusted unit_tests_dbms run locally because no build directory is present. A passing run containing ColumnTuple.InsertDefaultIsExceptionSafe would close this gap.
Final Verdict

Status: ✅ Approve

No inline findings. Merge should still wait for the pending CI signal.

@clickhouse-gh clickhouse-gh Bot added the pr-ci label Jun 9, 2026
@arsenmuk
arsenmuk marked this pull request as ready for review June 9, 2026 21:14
@asya-ch asya-ch self-assigned this Jun 9, 2026
@clickhouse-gh

clickhouse-gh Bot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

LLVM Coverage Report

Metric Baseline Current Δ
Lines 84.60% 84.60% +0.00%
Functions 92.30% 92.30% +0.00%
Branches 77.20% 77.20% +0.00%

Changed lines: Changed C/C++ lines covered by tests: 5/5 (100.00%) | Lost baseline coverage: none · Uncovered code

Newly covered by added/modified tests: 328 line(s), 32 function(s) across 115 file(s) · Details

Top files
  • src/Common/ZooKeeper/ZooKeeperImpl.cpp: 23 line(s)
  • src/Storages/StorageReplicatedMergeTree.cpp: 18 line(s)
  • src/Processors/QueryPlan/Optimizations/optimizeJoinByShards.cpp: 15 line(s)
  • src/Storages/MaterializedView/RefreshTask.cpp: 14 line(s)
  • src/Processors/Formats/Impl/Parquet/Decoding.cpp: 11 line(s)

Full report · Diff report

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-ci 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.

3 participants