-
-
Notifications
You must be signed in to change notification settings - Fork 718
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
Ensure tokens on futures are unique #8569
Conversation
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.
Can't speak for any potential repercussions of the changed test assertion, but the implementation here looks good to me. 👍
Unit Test ResultsSee test report for an extended history of previous test failures. This is useful for diagnosing flaky tests. 27 files ± 0 27 suites ±0 10h 1m 45s ⏱️ + 8m 0s For more details on these failures, see this check. Results for commit 8d096fd. ± Comparison against base commit 0438768. |
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.
Thanks, @fjetter! This looks reasonable to me.
return Future.make_future, (self.key, self._id) | ||
|
||
def __dask_tokenize__(self): | ||
return (type(self).__name__, self.key, self._id) |
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.
return (type(self).__name__, self.key, self._id) | |
return (normalize_token(type(self)), self.key, self._id) |
nit - mostly in case a third party subclasses distributed.Future
without changing the name
|
||
c.futures[x.key].finish() | ||
|
||
assert tok == tokenize(y) | ||
assert tok != tokenize(y) |
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.
assert tok != tokenize(y) |
nit: redundant with the test above
@@ -863,11 +863,13 @@ async def test_tokenize_on_futures(c, s, a, b): | |||
y = c.submit(inc, 1) | |||
tok = tokenize(x) |
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.
tok = tokenize(x) |
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.
Very minor nits as far as the code is concerned.
I'd like to have a read through the object deduplication code you mentioned in the issue before approving, if possible.
The object dedup was introduced here dask/dask-expr#798 but I will move forward with this now. |
This would be the simplest approach to fix #8561
There was a test that asserted on this behavior but I believe this is not an issue.