Repository navigation
Conversation
…es no part file behind
4 of 11 tasks
Collaborator
|
Shipped in the 0.2.94 release via #1046. |
This file contains hidden or 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
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.
What changed and why
Command::CancelDownloaddid nothing for a file Telegram serves: the fetch ran on and the.partfile stayed (#505). A Telegram download can now be stopped.Request::CancelDownloadanswers at once. A download waiting its turn lets go of its place, the piece on its way is the last, nothing is kept of the file on disk, and nothing is announced. A file already on disk stays, and asking for it again fetches it from the start. The player's byte windows are not downloads and stay. Other networks do nothing with the request. The window's own control that sends the request is not built yet; the request is.Type
Platforms
Proof
Scenario: e2e/scenarios/telegram-cancel-download
The scenario starts this build's chatd on Telegram's scripted wire, steers it the way
crates/chatd/tests/telegram.rsdoes, and speaks chatd's socket. A file the user opened is asked for piece by piece, and the wire holds the first piece. The driver stops the download and the wire lets go. Then Telegram is not asked for the rest, the part file is gone, and nothing landed. Asking for the file again fetches it from the start and it lands whole. A build from before the change does not know the request, asks Telegram for the rest of the file and keeps the part file, so this driver fails there.Lab run: not made. The driver was not run against the real chatd on a lab host.
Also run on this branch on Windows before this pull request:
cargo build --workspace --all-targets --features tinyclient/gui, thencargo nextest run --workspace --features tinyclient/gui(3681 passed, 28 skipped; among them the two new scripted-wire tests and the new unit test), thencargo test --workspace --doc --features tinyclient/gui.Compatibility
The protocol grows by one request,
CancelDownload. A chatd from before it answersUnsupportedto it, as it does to any op it does not know.Risk and rollback
A Telegram download that was stopped ends early and has to be asked for again from the start. Revert the commit.
Release note
A Telegram download can be stopped, and leaves no part file behind.
Part of #505. Left: asking before a download over 500 MB, and the window's control that sends the request.