-
-
Notifications
You must be signed in to change notification settings - Fork 763
Fix server hanging on aborted TCP comms (flaky test_RetireWorker_stress)
#9315
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
e4594f8
c68944e
d8dba7c
0556f30
73df97e
93329ec
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1296,9 +1296,19 @@ async def tensordot_stress(c, s): | |
| break | ||
| else: | ||
| raise RuntimeError("Expected 'update_graph' event not found") | ||
| # Test that we didn't recompute any tasks during the stress test | ||
| # Test that we didn't recompute any tasks during the stress test. | ||
| # Exception: when a worker is retired, any tasks that completed on it between the | ||
| # moment the AMM RetireWorker policy measured that no unique keys were left on it | ||
| # and the moment the worker was actually removed are lost and will be recomputed | ||
| # elsewhere (see RetireWorker.done). | ||
| await async_poll_for(lambda: not s.tasks) | ||
| assert sum(t.start == "memory" for t in s.transition_log) == expected_tasks | ||
| lost = sum( | ||
| len(msg["lost-computed-tasks"]) | ||
| for _, msg in await c.get_events("all") | ||
| if msg["action"] == "remove-worker" and msg["expected"] | ||
| ) | ||
| actual = sum(t.start == "memory" for t in s.transition_log) | ||
| assert expected_tasks <= actual <= expected_tasks + lost | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Additional commentary by Claude:
|
||
|
|
||
|
|
||
| @pytest.mark.slow | ||
|
|
@@ -1372,6 +1382,7 @@ async def test_ReduceReplicas_stress(c, s, *workers): | |
| }, | ||
| scheduler_kwargs={"transition_counter_max": 500_000}, | ||
| worker_kwargs={"transition_counter_max": 500_000}, | ||
| timeout=180, # Normally runs in ~5s, but has been observed to take up to 48s | ||
| ) | ||
| async def test_RetireWorker_stress(c, s, *workers, use_ReduceReplicas): | ||
| """It is safe to retire the best part of a cluster in the middle of a computation""" | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Additional commentary by Claude: