Skip to content

Revert "Introduce Window Aggregate Function Execution Strategy" - #130331

Closed
groeneai wants to merge 1 commit into
ClickHouse:masterfrom
groeneai:groeneai/revert-129257
Closed

groeneai wants to merge 1 commit into
ClickHouse:masterfrom
groeneai:groeneai/revert-129257

Conversation

@groeneai

@groeneai groeneai commented Nov 9, 2026 •

Copy link
Copy Markdown
Collaborator

Reverts #129257

Related: #129940
Related: #129257
Related: #130176 (comment)

Changelog category (leave one):

  • Not for changelog (changelog entry is not required)

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

Description

#129257 made window aggregate functions over a frame whose start moves ignore cancellation (Stress hung checks in 6 PRs since 2026-11-06, stuck in AggregateWindowFunctionRecalculate::evaluate; reported in #129940). With max_execution_time = 5 the reproducer stops after 5.7 s at the first parent e1e15a9 and is still running after 120 s at the merge commit d55bffe (5/5 runs, amd_release builds) and on master 4ce8938. A debug build of this revert stops after 5.5 s in 10/10 runs. An alternative fix is open in #130328.

Proof
SELECT theilsU(number, number) OVER (ORDER BY number ROWS BETWEEN 0 PRECEDING AND 99999 FOLLOWING)
FROM numbers(100000) FORMAT Null SETTINGS max_execution_time = 5, max_threads = 1;

clickhouse local, wall time limited by timeout -s KILL 120, GIT_HASH of each CI binary verified.

binary runs result
first parent e1e15a9 (amd_release) 5 Code: 159 TIMEOUT_EXCEEDED after 5.71-5.74 s
merge commit d55bffe (amd_release) 5 still running at 120 s
master 4ce8938 (amd_release) 5 still running at 120 s
this revert (debug) 10 Code: 159 TIMEOUT_EXCEEDED after 5.50-5.53 s

🤖 Generated with Claude Code


Workflow [PR]
Sync PR [sync-upstream/pr/130331]

…unctions_aggregates"

This reverts commit d55bffe, reversing
changes made to e1e15a9.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@groeneai

groeneai commented Nov 9, 2026

Copy link
Copy Markdown
Collaborator Author

cc @Michicosun, could you review this revert and add the can be tested label so CI runs? #129257 makes window aggregates over a frame whose start moves ignore cancellation: with max_execution_time = 5 the reproducer stops after 5.7 s at e1e15a9 and is still running after 120 s at d55bffe. The fix in #130328 is the alternative.

@clickhouse-gh

clickhouse-gh Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [073fcd7]

Summary: ⏳

job_name test_name status info comment
Config Workflow FAIL
can_be_tested FAIL
Dockers Build (amd) DROPPED
Dockers Build (arm) DROPPED
Dockers Build (multiplatform manifest) DROPPED
Style check DROPPED
Code Review DROPPED
Docs check (Mintlify) DROPPED
Fast test DROPPED
Fast test (arm_darwin) DROPPED
Build (arm_tidy, 1/4) DROPPED

@Michicosun

Copy link
Copy Markdown
Member

#130328

@Michicosun Michicosun closed this Nov 9, 2026
@clickhouse-gh clickhouse-gh Bot added the pr-not-for-changelog This PR should not be mentioned in the changelog label Nov 9, 2026
@groeneai

groeneai commented Nov 9, 2026

Copy link
Copy Markdown
Collaborator Author

Thanks. I ran the reproducer from this PR on the CI build of #130328 (amd_release, 0e5336e). With max_execution_time = 5 it stops after 5.4 s (5/5 runs). Without the limit, KILL QUERY stops it within 0.2 s (3/3); on master 4ce8938 the same query is still running 40 s after KILL QUERY with is_cancelled = 1, which is the hung check state.

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

Labels

pr-not-for-changelog This PR should not be mentioned in the changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants