-
-
Notifications
You must be signed in to change notification settings - Fork 727
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
Migrate ensure_computing transitions to new WorkerState event mechanism - part 2 #6062
Merged
Merged
Changes from 4 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
c4e07a1
Overhaul test_priorities.py (#6077)
crusaderky c017629
Refactor ensure_comuting() -> None to _ensure_computing() -> RecsInstrs
crusaderky 916cc94
cleanup
crusaderky b685965
Merge branch 'main' into WMSM/ensure_computing
crusaderky 6d208df
release_key() is never called on executing keys
crusaderky 3b91cf2
Revert "release_key() is never called on executing keys"
crusaderky f22099d
Deal with transition executing -> released
crusaderky 0a4902d
Deal with duplicates in the ready queue
crusaderky 708398b
Revert release_key
crusaderky 9c9c75a
comment
crusaderky dbe891a
cleanup
crusaderky File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1182,17 +1182,25 @@ async def test_reschedule_concurrent_requests_deadlock(c, s, *workers): | |
await ev.set() | ||
await c.gather(futs1) | ||
|
||
# If this turns out to be overly flaky, the following may be relaxed or | ||
# removed. The point of this test is to not deadlock but verifying expected | ||
# state is still a nice thing | ||
|
||
# Either the last request goes through or both have been rejected since the | ||
# computation was already done by the time the request comes in. This is | ||
# unfortunately not stable. | ||
if victim_ts.who_has != {wsC}: | ||
msgs = steal.story(victim_ts) | ||
assert len(msgs) == 2 | ||
assert all(msg[0] == "already-aborted" for msg in msgs), msgs | ||
assert victim_ts.who_has != {wsC} | ||
msgs = steal.story(victim_ts) | ||
msgs = [msg[:-1] for msg in msgs] # Remove random IDs | ||
|
||
# There are three possible outcomes | ||
expect1 = [ | ||
("stale-response", victim_key, "executing", wsA.address), | ||
("already-computing", victim_key, "executing", wsB.address, wsC.address), | ||
] | ||
expect2 = [ | ||
("already-computing", victim_key, "executing", wsB.address, wsC.address), | ||
("already-aborted", victim_key, "executing", wsA.address), | ||
] | ||
# This outcome appears only in ~2% of the runs | ||
expect3 = [ | ||
("already-computing", victim_key, "executing", wsB.address, wsC.address), | ||
("already-aborted", victim_key, "memory", wsA.address), | ||
] | ||
Comment on lines
+1198
to
+1202
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. This can be avoided by moving the ev.set (and gather) after the stories are collected 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. If you do that, the story is completely empty. |
||
assert msgs in (expect1, expect2, expect3) | ||
|
||
|
||
@gen_cluster(client=True, nthreads=[("127.0.0.1", 1)] * 3) | ||
|
This file contains 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
This file contains 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
Oops, something went wrong.
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.
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.
nit: should have an underscore
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.
where?