properly shutdown async compression, add tests #2988
Merged
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.
when looking into the test failures in #2987 I stumbled onto an issue:
Nullus157/async-compression#420
When I switched how I compress the archive index to async-compression, I didn't poperly shut down the encoder, which then lead to the zstd archive being corrupt. Currently it seems like only the EOF was missing, but the async-decompressor was still able to handle it and the decompressed database was 100% correct.
I added the async compression in #2920, so it's not too long.
As a first step, this PR fixes the compression, and adds a test.
Then I'm trying to decide if I fix / recreate these indexes, rebuild, or just attach the EOF marker if it's missing. It's about 90k releases in that time, so 180k archives.