-
-
Notifications
You must be signed in to change notification settings - Fork 719
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
Fix test_stress_scatter_death #6404
Changes from all commits
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 |
---|---|---|
|
@@ -495,3 +495,43 @@ async def test_forget_data_needed(c, s, a, b): | |
x = c.submit(inc, 2, key="x", workers=[a.address]) | ||
y = c.submit(inc, x, key="y", workers=[b.address]) | ||
assert await y == 4 | ||
|
||
|
||
@gen_cluster(client=True, nthreads=[("", 1)] * 3) | ||
async def test_missing_handle_compute_dependency(c, s, w1, w2, w3): | ||
"""Test that it is OK for a dependency to be in state missing if a dependent is asked to be computed""" | ||
|
||
fjetter marked this conversation as resolved.
Show resolved
Hide resolved
|
||
w3.periodic_callbacks["find-missing"].stop() | ||
|
||
f1 = c.submit(inc, 1, key="f1", workers=[w1.address]) | ||
f2 = c.submit(inc, 2, key="f2", workers=[w1.address]) | ||
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. f2 is unnecessary for the purpose of this test 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. I added this to have multiple keys fetched from w1. I don't think this is absolutely required but I decided to keep this in the test |
||
await wait_for_state(f1.key, "memory", w1) | ||
|
||
w3.handle_acquire_replicas( | ||
keys=[f1.key], who_has={f1.key: [w2.address]}, stimulus_id="acquire" | ||
) | ||
|
||
await wait_for_state(f1.key, "missing", w3) | ||
|
||
f3 = c.submit(sum, [f1, f2], key="f3", workers=[w3.address]) | ||
|
||
await f3 | ||
|
||
|
||
@gen_cluster(client=True, nthreads=[("", 1)] * 3) | ||
async def test_missing_to_waiting(c, s, w1, w2, w3): | ||
w3.periodic_callbacks["find-missing"].stop() | ||
|
||
f1 = c.submit(inc, 1, key="f1", workers=[w1.address], allow_other_workers=True) | ||
await wait_for_state(f1.key, "memory", w1) | ||
|
||
w3.handle_acquire_replicas( | ||
keys=[f1.key], who_has={f1.key: [w2.address]}, stimulus_id="acquire" | ||
) | ||
|
||
await wait_for_state(f1.key, "missing", w3) | ||
|
||
await w2.close() | ||
await w1.close() | ||
|
||
await f1 |
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.
This covers the changes in handle_compute where I moved around task states in the switch statement and added an error handler that was missing before