gvfs-helper: prevent and/or give advice on repeated downloads to shared object cache #840
+59
−4
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 have been a number of customer-reported problems with errors of the form
or
These are not actually due to network issues, but they look like it based on the stack that is doing retries. Instead, these actually have problems when installing the loose object or packfile into the shared object cache.
The loose objects are hitting issues when installing and the target loose object is corrupt in some way, such as all NUL bytes because the disk wasn't flushed when the machine shut down. The error results because we are doing a collision check without confirming that the existing contents are valid.
The packfiles may be hitting similar comparison cases, but it is less likely. We update these packfile installations to also skip the collision check.
In both cases, if we have a transient network error, we add a new advice message that helps users with the two most common workarounds:
I make special note of when the shared object cache doesn't exist and point that it probably should so the whole repo is suspect at that point.
GVFS Protocol.
Resolves #837.