Repository navigation
Conversation
Opening a Postgres connection can consume the deadline before initialization starts. Arm the test deadline after observing the blocked query so the test measures cleanup of the owned backend. Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Extend the test budget by the time spent waiting for the observer. The first wait still uses the timeout computed by the restore budget. Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.com>
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: #2100
Changelog category
Changelog entry
None.
Why
The restore cleanup test can spend its entire deadline opening a Postgres connection. The wait for initialization then expires before the test sees a blocked backend. A 280 ms connection delay reproduces the failure on the tested base and on clean main. Failed Postgres job
Scope and risk
Pause the test budget until
pg_stat_activityconfirms the initialization query is blocked. The wait uses the timeout computed by the production budget. The test checks the cleanup deadline, the public close, and removal of the backend and its lock.Compatibility, rollout and rollback
Tests
tests/integration/test_cell_restore.pypassed on private Postgres 18 and ClickHouse, with the same 280 ms delay applied to the deadline case.make format,make lint, andmake typecheck.AI assistance in the code
Checklist
Note
Low Risk
Low risk as changes are strictly limited to timing synchronization within an integration test fixture.
Overview
Updates
test_restore_owns_raw_backend_before_initializationto exclude connection and fixture setup time from the restore deadline budget.In the deadline scenario,
asyncio.waitis monkeypatched to wait until Postgres confirms the query is sleeping before advancing the budget deadline, preventing flaky timeouts caused by slow connection establishment.Reviewed by Cursor Bugbot for commit 4ce374c. Bugbot is set up for automated code reviews on this repo. Configure here.