fix(backend): spool released exports safely#6926
Open
clonder wants to merge 1 commit into
Open
Conversation
Build each export from one successful query result so X-Total-Records matches the served bytes and the database transaction ends before transfer. Write security headers before the async file copy. Bound spool storage and clean it across retries, failed handoffs, timeouts, disconnects, and restarts. Align the bundled download clients and deployment timeouts with generating the full spool before the first byte is sent. Refs #3511, #5198
anna-parker
reviewed
Jul 21, 2026
Contributor
There was a problem hiding this comment.
@clonder and @corneliusroemer I heard you guys did some perf of this new feature - could you maybe summarize your results in the PR description? would be nice to have this for future reference :-)
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
materialize each released-data export from a single successful run of the released-record stream. count records while writing the temporary file so
X-Total-Recordsmatches the served bytes and the database transaction closes before network transfer begins.because the backend now prepares the complete export before sending the first byte, increased the read timeouts for the bundled SILO and CLI clients and configure bounded spool storage in the deployment.
Resolves #5198
Related to #3511
🚀 Preview: https://fix-get-released-data-sin.loculus.org