Repository navigation
OSS-336: Stream bulk storage with verified recovery - #471
Merged
Merged
Conversation
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.
Bulk storage used whole-file byte slices and one base64 JSON line, so local and worker paths could not meet the advertised large-world limits. Add protocol v2 with acknowledged 256 KiB chunks, sequence/chunk/whole-stream SHA-256 verification, bounded channel parsing, 16 handles/session, explicit cancellation and transactional file promotion. Whole-file helpers now enforce 8 MiB consistently; older workers refuse streaming with an upgrade message.
Migrate backup/restore/ZIP output and extraction, local worldstore backup, binary upload/copy/download/manual packs, and staged modpack publication. File listing remains metadata-only. Staged rollback now stores verified old files plus a versioned manifest on the owning node before live writes, rather than retaining all file bodies in memory. Interrupted recovery directories block retries; ordinary abort removes only its owned temporary, and failed commits/rollback preserve recovery artifacts. ADR 0013 and the recovery runbook describe ownership, limits and OS durability boundaries.
Validation includes real 130 MiB local/shared/process-worker roundtrips with sampled bounded controller heap, process ZIP create/extract and deterministic manifest backup/restore, checksum/sequence/oversized-frame/cancellation fault injection against the real worker binary, partial-write/rename-failure target preservation, and 130 MiB staged apply/undo with corrupt-recovery refusal. The production Docker SDK attach/demultiplex path passes 130 MiB against an isolated HTTP engine fixture serving the confined worker; this is not a live-daemon/container qualification. A 12 MiB upload/copy/download RPC regression crosses the new helper limit. Existing staging and RPC suites pass. Full Go tests and vet pass on the merged review head cfd1d09; the follow-up Windows upload cleanup regression passes on 7fde460. Knowledge lint: 56 concepts, 37 retrieval queries pass.
Controller and worker images must upgrade together. Metadata/ZIP directory structures still scale with entry counts. Same-directory rename and file sync do not establish cross-platform power-loss durability; ambiguous commit disconnects require inspecting target/staging before retrying. No production Docker or persistent user-data changes were performed.
Jira: OSS-336. Draft pending CI and independent review.