docs: propose disk cache codec architecture - #1306
Draft
MrCroxx wants to merge 3 commits into
Draft
Conversation
Signed-off-by: MrCroxx <mrcroxx.cs@gmail.com>
Signed-off-by: MrCroxx <mrcroxx.cs@gmail.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 🚀 New features to boost your workflow:
|
Signed-off-by: MrCroxx <mrcroxx.cs@gmail.com>
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.
What changed
Raw,IoSliceMut, andIoBufremain the direct-I/O submission layer, whileBytesandOwnedBytesare immutable owner-backed decode views created after I/O completion.Why
Code::decodecurrently constructs an owned value fromRead, so it cannot transfer ownership of the I/O buffer to the decoded result. Serialization is also embedded directly in the block-engine data path. The RFC proposesOwnedBytesandEntryCodec<K, V>to separate application formats from storage engines while preserving the existing serde andCodecompatibility path.Bytes::from_ownercan preserve a 4K-aligned allocation without copying, butBytesdoes not provide a type-level alignment guarantee and arbitrary slices may shift the pointer. The RFC therefore keeps direct-I/O buffers and post-I/O decode views as separate abstractions.Impact
This PR adds documentation only. It does not change public APIs, persistent formats, or runtime behavior. Follow-up implementation work can proceed in the stages described by the RFC, with the remaining format decisions resolved before the v2 envelope becomes the default write format.
Validation
Code,Engine, block-engine, direct-I/O buffer, and I/O-buffer ownership data paths.