v2.1: Disables tar's sparse file handling when archiving a snapshot (backport of #5445) #5505
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.
Problem
Upgrading the tar crate causes intermittent snapshot archiving errors123.
For the recent string of snapshot archiving errors, I looked at the tar crate we use in v2.1 vs v2.0.
In v2.1 we use tar version 0.4.42. In v2.0 we use tar version 0.4.41. Looking through the commits between these versions of the tar crate revealed that this lseek error is new in v0.4.42! And here's the PR that added it: alexcrichton/tar-rs#375
I opened an issue on the tar crate: alexcrichton/tar-rs#403.
Summary of Changes
Disable tar's sparse file handing, since the errors only happen when sparse mode is enabled.
Note, I intend to backport this to v2.1.
Additional Testing
I ran this PR on a mnb node for 18+ hours without issue. I know this isn't a long time, as the full snapshot archiving was only exercised a few times, but it does show it is not immediately broken. I also restarted the node and had it load from its own snapshot archives, and that was successful as well. This means the snapshots created were not broken.
This is an automatic backport of pull request #5445 done by Mergify.
Footnotes
https://discord.com/channels/428295358100013066/689412830075551748/1349323763270946826 ↩
https://discord.com/channels/428295358100013066/689412830075551748/1352336706581303336 ↩
https://github.com/anza-xyz/agave/issues/4211 ↩