Skip to content

Cap 04299_move_assignment_memory_limit loop at 60 seconds - #108273

Merged
Algunenano merged 2 commits into
ClickHouse:masterfrom
Algunenano:fix-04299-move-assignment-timeout
Jun 24, 2026
Merged

Algunenano merged 2 commits into
ClickHouse:masterfrom
Algunenano:fix-04299-move-assignment-timeout

Conversation

@Algunenano

@Algunenano Algunenano commented Jun 23, 2026 •

Copy link
Copy Markdown
Member

The test spawns a fresh clickhouse-client 500 times. The query is trivial (constants, FORMAT Null, no storage), so per-iteration process startup dominates. Under TSan it takes ~1.5s/iteration, so 500 iterations exceed the 600s run timeout and the test is killed.

A buggy build terminates within a few dozen iterations, so the full 500 are never needed to catch the regression. Cap the loop at 500 iterations or 60 seconds, whichever comes first, using the bash SECONDS builtin.

Observed in MasterCI Stateless tests (amd_tsan, s3 storage, parallel, 2/2):
https://s3.amazonaws.com/clickhouse-test-reports/json.html?REF=master&sha=be3417e5cb5428775e9586b2b453ad8b07aee237&name_0=MasterCI&name_1=Stateless%20tests%20%28amd_tsan%2C%20s3%20storage%2C%20parallel%2C%202%2F2%29

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):

...

🤖 Generated with Claude Code

Version info

  • Merged into: 26.6.1.1199

The test spawns a fresh clickhouse-client 500 times. The query is trivial
(constants, FORMAT Null, no storage), so per-iteration process startup
dominates. Under TSan it takes ~1.5s/iter, so 500 iterations exceed the 600s
run timeout and the test is killed.

A buggy build terminates within a few dozen iterations, so the full 500 are
never needed to catch the regression. Cap the loop at 500 iterations or 60
seconds, whichever comes first, using the bash SECONDS builtin. This keeps the
slowest configs well under the timeout while preserving the regression check.

Observed in MasterCI Stateless tests (amd_tsan, s3 storage, parallel, 2/2):
https://s3.amazonaws.com/clickhouse-test-reports/json.html?REF=master&sha=be3417e5cb5428775e9586b2b453ad8b07aee237&name_0=MasterCI&name_1=Stateless%20tests%20%28amd_tsan%2C%20s3%20storage%2C%20parallel%2C%202%2F2%29

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@clickhouse-gh

clickhouse-gh Bot commented Jun 23, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [cc78d9d]

Summary: ❌

job_name test_name status info comment
Stress test (arm_debug) FAIL
Hung check failed, possible deadlock found FAIL cidb, issue ISSUE EXISTS
Stress test (arm_tsan) ERROR IGNORED

AI Review

Summary

This PR limits 04299_move_assignment_memory_limit to 500 iterations or 60 seconds and makes the shell script exit status independent of the final arithmetic time check. The change is narrowly scoped to a CI timeout fix, the CI Fix or Improvement metadata matches the patch, and I found no correctness or test-runner reliability issues that need inline comments.

Final Verdict

Status: ✅ Approve

@clickhouse-gh clickhouse-gh Bot added the pr-ci label Jun 23, 2026
On fast builds (e.g. arm_binary) all 500 iterations finish before the 60s
budget, so the loop ends naturally and its last evaluated command is the
arithmetic time check, which is false (exit status 1) until the budget is hit.
The script then exits 1 and clickhouse-test marks the test failed even though
no regression occurred.

Invert the check to `(( elapsed < 60 )) || break` and add an explicit
`exit 0`, so the script's status is independent of the timing test.

Observed in PR Stateless tests (arm_binary, parallel):
https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=108273&sha=6cbcf1aff7dbb2fc7194f3f03dc9b039e418af0b&name_0=PR&name_1=Stateless%20tests%20%28arm_binary%2C%20parallel%29

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@clickhouse-gh

clickhouse-gh Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

LLVM Coverage Report

Metric Baseline Current Δ
Lines 85.30% 85.30% +0.00%
Functions 92.50% 92.50% +0.00%
Branches 77.50% 77.50% +0.00%

Changed lines: No C/C++ source files changed — skipping uncovered code analysis.

Newly covered by added/modified tests: 222 line(s), 33 function(s) across 88 file(s) · Details

Top files
  • src/Parsers/parseFieldFromCastedLiteral.cpp: 10 line(s), 11 function(s)
  • src/Analyzer/Resolve/QueryAnalyzer.cpp: 10 line(s)
  • src/Dictionaries/RegExpTreeDictionary.h: 9 line(s), 7 function(s)
  • src/Storages/MergeTree/ReplicatedMergeTreeSink.cpp: 8 line(s)
  • src/Disks/MetadataStorageWithPathWrapper.h: 7 line(s), 6 function(s)

Full report

@Algunenano
Algunenano enabled auto-merge June 24, 2026 08:29
@Algunenano
Algunenano added this pull request to the merge queue Jun 24, 2026
Merged via the queue into ClickHouse:master with commit c633c72 Jun 24, 2026
164 of 167 checks passed
@Algunenano
Algunenano deleted the fix-04299-move-assignment-timeout branch June 24, 2026 08:58
@robot-ch-test-poll3 robot-ch-test-poll3 added the pr-synced-to-cloud The PR is synced to the cloud repo label Jun 24, 2026
zeekay pushed a commit to hanzoai/datastore that referenced this pull request Sep 11, 2026
…ssignment-timeout

Cap 04299_move_assignment_memory_limit loop at 60 seconds
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.

2 participants