Repository navigation
Backport #108441 to 26.3: Stop refreshable MV gracefully on Keeper without MULTI_READ on ATTACH/restore - #119364
Conversation
…thout MULTI_READ on ATTACH/restore
|
Workflow [BackportPR], commit [eb1aa59] Summary: ✅ |
|
The two integration reds here are this cherry-pick, but they are not a product problem on 26.3. The The product fix works. In the failing tsan run the graceful stop fires one second after the No abort, and zero occurrences of What hangs is Why. On 26.3, if (coordination.coordinated && !refresh_append)
while (true)
{
UUID expected_table_uuid = coordination.root_znode.last_success_table_uuid;
...
if (storage && storage->getStorageID().uuid == expected_table_uuid)
return;
std::this_thread::sleep_for(std::chrono::milliseconds(10));The give-up path returns before Master does not have that shape: CI already ran the control. The 26.6 arm #118301 passed this exact test in the same two job I cannot push to
Backporting Option 1 diff (tests/integration/test_refreshable_mv_no_multi_read/test.py)@@ -79,14 +79,13 @@
# The server must be up and answering queries (no crash, no crash-loop).
assert node.query("SELECT 1").strip() == "1"
- # Attach schedules the graceful-stop pass asynchronously, so the status read can otherwise
- # observe the transient Scheduling state before doScheduling reaches the Disabled state. Wait
- # for the scheduled pass to settle (WAIT VIEW returns immediately once the view is Disabled).
- node.query("SYSTEM WAIT VIEW rdb.mv")
-
- # The view must have stopped gracefully, reporting the reason rather than aborting.
- status = node.query(
- "SELECT status, exception FROM system.view_refreshes WHERE view = 'mv'"
+ # The view must have stopped gracefully, reporting the reason rather than aborting. Attach
+ # schedules the graceful-stop pass asynchronously, so poll for it to settle rather than
+ # observing the transient Scheduling state.
+ status = node.query_with_retry(
+ "SELECT status, exception FROM system.view_refreshes WHERE view = 'mv'",
+ check_callback=lambda x: "Disabled" in x,
+ retry_count=120,
)
assert "Disabled" in status, status
assert "multi-read" in status.lower() or "multi_read" in status.lower(), status
@@ -103,10 +102,11 @@
assert node.query("SELECT 1").strip() == "1"
# SYSTEM REFRESH VIEW is async: run() moves the task to Scheduling, and only the background
# scheduler later hits the coordination.unavailable branch and switches it back to Disabled.
- # Wait for that scheduled pass before asserting, so the read never observes transient Scheduling.
- node.query("SYSTEM WAIT VIEW rdb.mv")
- status = node.query(
- "SELECT status FROM system.view_refreshes WHERE view = 'mv'"
+ # Poll for that scheduled pass, so the read never observes transient Scheduling.
+ status = node.query_with_retry(
+ "SELECT status FROM system.view_refreshes WHERE view = 'mv'",
+ check_callback=lambda x: x.strip() == "Disabled",
+ retry_count=120,
).strip()
assert status == "Disabled", status
assert not node.contains_in_log("Unexpected exception in refresh scheduling")The The other three reds are pre-existing 26.3 conditions rather than anything from this cherry-pick. |
26.3's wait() lacks master's early return for a Disabled view and enters the target-table UUID handshake; with coordination.unavailable root_znode was never read, so it spins forever and the new test times out. Co-Authored-By: Claude Fable 5.1 <[email protected]>
Original pull-request #108441
Cherry-pick pull-request #118300
This pull-request is a last step of an automated backporting.
Treat it as a standard pull-request: look at the checks and resolve conflicts.
Merge it only if you intend to backport changes to the target branch, otherwise just close it.
The PR source
The PR is created in the CI job
Version info
26.3.33.54