Skip to content

Cherry pick #127158 to 26.10: Fix flaky test 05239_workload_drop_memory_reservation_in_use - #127458

Merged
robot-clickhouse-ci-2 merged 3 commits into
backport/26.10/127158from
cherrypick/26.10/127158
Oct 22, 2026
Merged

robot-clickhouse-ci-2 merged 3 commits into
backport/26.10/127158from
cherrypick/26.10/127158

Conversation

@robot-clickhouse

Copy link
Copy Markdown
Member

Original pull-request #127158

Do not merge this PR manually

This pull-request is a first step of an automated backporting.
It contains changes similar to calling git cherry-pick locally.
If you intend to continue backporting the changes, then resolve all conflicts if any.
Otherwise, if you do not want to backport them, then just close this pull-request.

The check results does not matter at this step - you can safely ignore them.

Before you resolve anything

Conflicts are often caused by a prerequisite change that has not been backported yet, rather than by a real divergence. The bot re-tries this cherry-pick against the release branch on every run, so if that is the case here it will merge itself as soon as the prerequisite lands, and you will see a comment saying so. Manual resolution is only needed while the conflict persists.

Troubleshooting

If the conflicts were resolved in a wrong way

If this cherry-pick PR is completely screwed by a wrong conflicts resolution, and you want to recreate it:

  • delete the pr-cherrypick label from the PR
  • delete this branch from the repository

You also need to check the Original pull-request for pr-backports-created label, and delete if it's presented there

The PR source

The PR is created in the CI job

groeneai and others added 2 commits October 21, 2026 11:00
Since #123341, DROP WORKLOAD purges the dropped workload's queue: the
running query's memory reservation fails with MEMORY_RESERVATION_FAILED
("Allocation queue is about to be destructed") at its next sync, which
for sleepEachRow(1) with max_block_size 1 is the end of the current
1-second step. When that step ends between DROP WORKLOAD and KILL QUERY,
the query is already gone and KILL matches nothing. That was a silent
no-op until #125968 made kill_throw_if_noop default to true; now KILL
writes NOTHING_TO_KILL to stderr and the test fails with
"having stderror" (master 3eecd13, amd_asan_ubsan).

The failing purge is the intended behavior (covered by the
MemoryReservationDropWorkloadFailsRunningAllocation gtest), so the test
now tolerates a no-op KILL with kill_throw_if_noop = false, the idiom of
03824 and 04726, and its comment states the current semantics. Other
KILL errors still reach stderr, and the reservation is destroyed after
the purge in both branches.

Validated on the CI binaries of 3eecd13: amd_asan_ubsan unmodified
7/30 FAIL (all NOTHING_TO_KILL), fixed 50/50 OK with 17 runs in the
drop-failed branch; amd_debug with sleep 1.5 injected between DROP and
KILL: unmodified 10/10 FAIL, fixed 10/10 OK; plain fixed 50/50 OK.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…p-kill-noop

Fix flaky test `05239_workload_drop_memory_reservation_in_use`
@robot-clickhouse robot-clickhouse added pr-cherrypick Cherry-pick of merge-commit before backporting. Do not use manually - automated use only! do not test disable testing on pull request labels Oct 22, 2026
@robot-clickhouse-ci-2

Copy link
Copy Markdown
Contributor

The 26.10 branch moved since this cherry-pick was created (now at dc34cd6). Re-tried the merge against it and it applies cleanly, so the bot is proceeding without manual resolution.

@robot-clickhouse-ci-2
robot-clickhouse-ci-2 merged commit 298b45e into backport/26.10/127158 Oct 22, 2026
1 check passed
@robot-clickhouse-ci-2
robot-clickhouse-ci-2 deleted the cherrypick/26.10/127158 branch October 22, 2026 20:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do not test disable testing on pull request pr-cherrypick Cherry-pick of merge-commit before backporting. Do not use manually - automated use only!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants