Repository navigation
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
zlareb1
force-pushed
the
fix/cell-attach-trigger-deadline-clock
branch
from
November 21, 2026 01:32
f6ab8fd to
559c141
Compare
The work watchdog and cleanup clocks share one function-scoped event loop. Preserve all original stall cases and bounds, and require a genuinely blocked close to time out and cancel. Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
The test marker uses the same function-scoped loop as the idle clock fixture. Assert their runtime loop identity before setting phase clocks so scope drift fails each collected stall case. Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com> (cherry picked from commit 9f7988578ecc0654720996156bff919ae33199e5) Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
zlareb1
force-pushed
the
fix/cell-attach-trigger-deadline-clock
branch
from
November 21, 2026 01:47
559c141 to
8c5c767
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related: #1094
Changelog category (leave one):
Changelog entry
Not required.
Why
The trigger-try unit fixture gives work a short event-loop timeout and freezes its cleanup clock. Its outer watchdog also uses the event-loop clock. Scheduling can consume the watchdog before the work timeout and cleanup finish their separate turns. A controlled 250 ms loop-clock advance reproduces the reset case's stuck-task assertion; its zero-jump neighbour passes. The historical CI scheduling cause remains unknown.
The six stall cases explicitly request the same function-scoped loop as their clock fixture. A runtime identity assertion checks that the test and fixture use that loop before setting phase clocks. The cases share a private idle clock between the event loop, owner phase and Postgres close. Work and cleanup still run their real cancellation code. The watchdog, phase bound and all original cancellation rounds remain unchanged. This fixture does not qualify real wall-clock latency.
Scope and risk
One existing unit module changes. Every original test body, all six stall parameters, the 200 ms watchdog and three 10 ms cancellation rounds remain unchanged. The clock fixture activates only for this parameterized case and its new controls.
A genuinely blocked public close must still time out, terminate its fake connection and cancel its pending close task. An orphan-task control requires the fixture to cancel, drain and reject newly created tasks on its private function-scoped loop. Scoped patches restore all clock and helper bindings. The fixture relies on the selector loop used by the unit test platform.
Compatibility, rollout and rollback
Prior-source regression evidence
.venv/bin/python -m pytest tests/unit/test_cell_attach.py -q -k 'a_trigger_try_deadline_covers_transaction_and_lock_cleanup or trigger_try_clock' --override-ini=addopts=: 10 passed, including all six original stall cases.git diff --checkpass.Tests
All three new clock-control functions explicitly request function-scoped loops, matching the six collected original stalls. A separate temporary collection check rejects the four collected control cases before the marker correction, then accepts all ten selected cases afterward. The same ten cases pass execution. Every published and original test body, all original assertions, phase and watchdog deadlines remain unchanged. Full-module prose remains failed on the same three baseline literals; added text and this body pass their scoped prose checks.
On this current-main composition, all ten directly related original stall and clock control cases pass. Scoped Ruff lint and formatting, added-text prose, public-body prose and committed-range whitespace checks pass. All 55 published test bodies retain identical ASTs and the reviewed loop marker and identity guard match their exact source commit. The full-module prose checker has three unchanged baseline test literals; the preserved baseline equivalence receipt records those failures. Full hosted CI and a fresh independent whole review remain required.
AI assistance in the code
AI-generated: Codex wrote the fixture and controls. The original test bodies, deadlines, production source and focused results were checked.
I can explain every line of this diff and how it interacts with the rest of Loom.
Checklist