-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Remove bzip2, gzip, and none from supported compression types #33442
Conversation
01c32a7
to
bd3d1fa
Compare
These extra compression types are inferior for us and have caused us extra support burden (especially none). This change does retain the ArchiveFormat::Tar such that we can continue to skip compression for unit tests. However, "tar" has been removed from the possible values array which means passing "--snapshot-archive-format tar" will error out.
bd3d1fa
to
2ede3e2
Compare
ArchiveFormat::TarGzip, | ||
ArchiveFormat::TarBzip2, | ||
ArchiveFormat::TarLz4, | ||
ArchiveFormat::Tar, // `solana-test-validator` creates uncompressed snapshots |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment is not true - test-validator uses the default value in SnapshotConfig
which is ArchiveFormat::TarZstd
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So there's a slight risk of ecosystem trauma here, as we're rugging some snapshot forms entirely. A more gentle approach would seem to be:
- Remove the ability to create bz2, gz, and none snapshots in v1.17. Fortunately the 1.17 train is about to leave the station since we just hit supermajority on 1.16!
- Once 1.17 forks off master, land the rest of this PR.
But also, I think some of the initial ledger snapshots from single digit epochs were in .gz format. If so then I feel we want to retain the ability to load gzip snapshots forever. I'm unsure if we ever used bzip2 snapshots in the ledger archives. Safest might be to retain the ability to load both bzip2 and gzip snapshots forever..
That's a fair point. It also occurred to me that someone using
That seems reasonable, and wouldn't be too hard to do. As-is, I believe the logic that finds snapshots to load from searches the snapshot directory and determines the type based on filename. The CLI specified format only influences the format for snapshots that weill be created
👍 |
@brooksprumo - You were going to be a reviewer on this anyways; does the plan mvines laid out above seem reasonable to you? That is, stop the ability to create gzip/bzip2/non-compressed snapshots in v1.17, and cut them from v1.18 completely? |
Codecov Report
@@ Coverage Diff @@
## master #33442 +/- ##
=========================================
- Coverage 81.9% 81.9% -0.1%
=========================================
Files 798 798
Lines 217100 217049 -51
=========================================
- Hits 177967 177915 -52
- Misses 39133 39134 +1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@brooksprumo - You were going to be a reviewer on this anyways; does the plan mvines laid out above seem reasonable to you? That is, stop the ability to create gzip/bzip2/non-compressed snapshots in v1.17, and cut them from v1.18 completely?
Yeah, I think changing the cli args for solana-validator and solana-ledger-tool should be the only changes for v1.17.
For v1.18+, I think we may want to keep the ability to read the other snapshot formats indefinitely... Or at least two versions. So maybe v1.19 can remove some more stuff. (Basically I want to ensure master
can always open any snapshot generated by the stable version.)
Thanks for working on this, though! Sorry for any wasted effort though.
Regardless of compression format, are we certain that current code (tip of master) could open a snapshot from a single digit epoch? I feel like I remember there being some breaking changes along the way. I guess I could try this out pretty quickly with ledger-tool |
I would not be surprised if old snapshots require an older version of |
Yeah you're probably very right. That ship has likely already sailed given we don't really have explicit unit tests for legacy snapshots |
I was curious so I downloaded some snapshots from the Google Bucket and tried to open with
So, we seemingly cannot open any .bz2 snapshot with current ledger-tool. And I didn't see any .gz in the bucket. Based on this, I'd be inclined to say that ripping out bz2 and gz is fair game in master (unless we intend to patch things up in master to restore compat with old snapshot versions - would be cool but doubt we'd consider this a priority) |
Given Brook's comment above,
I'm going to close this PR for now in favor of #33484 which is along the lines of the gentler approach that mvines mentioned. |
Problem
These extra compression types are inferior for us and have caused us extra support burden (especially none). Trent mentioned this the other day with general support in Slack, and waking up to several people asking for support with
none
was the straw that broke the camel's back for me.Summary of Changes
Rip out archive format types that we do not use. This change does retain the ArchiveFormat::Tar such that we can continue to skip compression for unit tests. However, "tar" has been removed from the possible values array which means passing "--snapshot-archive-format tar" will error out.