-
Notifications
You must be signed in to change notification settings - Fork 434
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
test: no missed wakeups, cancellation and timeout flow to downloads #7863
Merged
Conversation
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
koivunej
changed the title
test: show that there is no missed wakeup
test(remote_storage): show that there is no missed wakeup
May 23, 2024
3186 tests run: 3047 passed, 0 failed, 139 skipped (full report)Code coverage* (full report)
* collected from Rust tests only The comment gets automatically updated with the latest test results
700c12d at 2024-06-04T09:39:53.155Z :recycle: |
koivunej
requested review from
problame and
jcsp
and removed request for
problame
May 23, 2024 17:03
koivunej
changed the title
test(remote_storage): show that there is no missed wakeup
test(remote_storage): no missed wakeups, cancellation and timeout flow to downloads
May 24, 2024
koivunej
changed the title
test(remote_storage): no missed wakeups, cancellation and timeout flow to downloads
test: no missed wakeups, cancellation and timeout flow to downloads
May 24, 2024
koivunej
commented
May 24, 2024
koivunej
force-pushed
the
joonas/missed_wakeup
branch
from
May 24, 2024 10:58
523ce7b
to
c8c5514
Compare
jcsp
approved these changes
Jun 3, 2024
this allows timeouting with pause failpoint.
koivunej
force-pushed
the
joonas/missed_wakeup
branch
from
June 3, 2024 12:58
c8c5514
to
d077377
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
I suspected a wakeup could be lost with
remote_storage::support::DownloadStream
if the cancellation and inner stream wakeups happen simultaneously. The next poll would only return the cancellation error without setting the wakeup. There is no lost wakeup because the single future for getting the cancellation error is consumed when the value is ready, and a new future is created for the next value. The new future is always polled. Similarly, if only theStream::poll_next
is being used after aSome(_)
value has been yielded, it makes no sense to have an expectation of a wakeup for the (N+1)th stream value already set because when a value is wanted,Stream::poll_next
will be called.A test is added to show that the above is true.
Additionally, there was a question of these cancellations and timeouts flowing to attached or secondary tenant downloads. A test is added to show that this, in fact, happens.
Lastly, a warning message is logged when a download stream is polled after a timeout or cancellation error (currently unexpected) so we can rule it out while troubleshooting.