-
Notifications
You must be signed in to change notification settings - Fork 154
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
maintner: don't try to download negative bytes
If the maintnerd server restarts with some uncommitted transactions, clients may end up having more downloaded bytes than the server, after the server restarts. We're invariably heading towards an ErrSplit if this happens (which is fine, otherwise we'd need to add more code to avoid duplicate event processing and it's unlikely to be worthwhile). In such a situation, don't try to download new data from the server, since that's guaranteed to fail with a 416 Range Not Satisfiable error. Do try to reuse the prefix of the existing data as long as its checksum matches, otherwise download the new version of the growing file. Fixes golang/go#26922. Updates golang/go#51211. Change-Id: Ide099ee0740e854cfe764db8c3b4341836a237f4 Reviewed-on: https://go-review.googlesource.com/c/build/+/414434 TryBot-Result: Gopher Robot <gobot@golang.org> Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Alex Rakoczy <jenny@golang.org> Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
- Loading branch information
Showing
2 changed files
with
66 additions
and
31 deletions.
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