-
Notifications
You must be signed in to change notification settings - Fork 6k
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 two types of eviction hangs #5225
Merged
Merged
Changes from 5 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
80a27f7
fix reconstruction hangs
ericl b778a7c
reformat
ericl 81e108e
doc
ericl 7eead67
tests
ericl 3e25ccc
revert build
ericl ca0e112
fix test
ericl 2755bdd
comments
ericl efd3679
comment 2
ericl 8e5e6d6
h file
ericl a25f7b7
revert
ericl c346259
Merge remote-tracking branch 'upstream/master' into fix-hang
ericl b54da56
Merge remote-tracking branch 'upstream/master' into fix-hang
ericl e4d9816
fix test
ericl 0c768e2
Merge remote-tracking branch 'upstream/master' into fix-hang
ericl 25c862c
fix
ericl 9c61b41
fix merge
ericl 75d341d
py3
ericl 5cdc8ab
fix flaky tests
ericl 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
from __future__ import absolute_import | ||
from __future__ import division | ||
from __future__ import print_function | ||
|
||
import numpy as np | ||
import unittest | ||
|
||
import ray | ||
|
||
|
||
class TestUnreconstructableErrors(unittest.TestCase): | ||
def setUp(self): | ||
ray.init(object_store_memory=10000000, redis_max_memory=10000000) | ||
|
||
def tearDown(self): | ||
ray.shutdown() | ||
|
||
def testDriverPutEvictedCannotReconstruct(self): | ||
x_id = ray.put(np.zeros(1 * 1024 * 1024)) | ||
ray.get(x_id) | ||
for _ in range(10): | ||
ray.put(np.zeros(1 * 1024 * 1024)) | ||
self.assertRaises(ray.exceptions.UnreconstructableError, | ||
lambda: ray.get(x_id)) | ||
|
||
def testLineageEvictedReconstructionFails(self): | ||
@ray.remote | ||
def f(data): | ||
return 0 | ||
|
||
x_id = f.remote(None) | ||
ray.get(x_id) | ||
for i in range(200): | ||
if i % 100 == 0: | ||
print("launching round of tasks to evict lineage", i) | ||
ericl marked this conversation as resolved.
Show resolved
Hide resolved
|
||
ray.get([f.remote(np.zeros(10000)) for _ in range(100)]) | ||
self.assertRaises(ray.exceptions.UnreconstructableError, | ||
lambda: ray.get(x_id)) | ||
|
||
|
||
if __name__ == "__main__": | ||
unittest.main(verbosity=2) |
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
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
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.
Does it make sense to put these in a new file? Maybe they should go in
test_failure.py
instead.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.
Isn't that test file too large already?
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.
Hmm I'd prefer we just put it there now and reorganize that whole file later, but up to you.