Add rollout support to the remote store layer#125
Merged
Conversation
added 2 commits
July 8, 2026 20:33
Mirrors the existing ContextRecord remote path for the native RolloutRecord schema across all five crates. Purely additive — no ContextRecord behavior changes. - lance-context-api: RolloutStoreApi trait (add/list/get/get_blob/ version/checkout) + rollout DTOs. - lance-context-client: RemoteRolloutStore HTTP client with a multipart upload path for large binary artifacts. - lance-context-server: rollout routes + per-name store map. A single POST /records endpoint chooses encoding by Content-Type — JSON inlines binary_payload as base64; multipart sends a `metadata` part first, then one raw binary part per record-with-a-blob, named by zero-based index. The multipart path is strict-reject: metadata-not-first, unparseable/ out-of-bounds/duplicate index, a size mismatch, or a declared-but-absent payload rejects the whole request with 400 before anything is written. - lance-context-core: RolloutRecord <-> DTO mapping + RolloutStoreApi impl. - lance-context: unified RolloutStore enum dispatching Local/Remote, mirroring ContextStore. Artifact blobs travel as raw multipart parts to avoid base64 inflation and full-blob buffering. payload_checksum is a caller-supplied opaque string, stored as-is. Rollout datasets use a `.rollout.lance` suffix so a rollout store and a context store can share a name without colliding. Tests: server 26 (8 rollout, incl. multipart strict-reject), api 6, core 102 (+1 ignored). clippy --all-features clean. Co-Authored-By: Beinan Wang <beinanwang@microsoft.com>
Co-Authored-By: Beinan Wang <beinanwang@microsoft.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.
Summary
RolloutRecord/RolloutStore(landed in Native RolloutRecord schema and RolloutStore for RL rollout storage #124)across the remote store layer, mirroring the existing
ContextRecordremote path. Purely additive — the
ContextRecordpath is untouched.POST /api/v1/rollouts/{name}/recordsendpoint accepts eitherencoding, chosen by
Content-Type:application/jsoninlinesbinary_payloadas base64;multipart/form-datasends ametadatapart (records array, payloads null) followed by one raw binary part per
record-with-a-blob, named by zero-based index. Avoids ~33% base64
inflation and full-blob buffering for large artifacts.
RolloutStoreenum (Local / Remote) behind theremotefeature, mirroring
ContextStore.Multipart strict-reject
A rollout append feeds training and is atomic, so the whole request is
rejected with
400before anything is written when: the first part isnot
metadata; a part name is not a valid record index (unparseable /out of bounds); an index is duplicated; a byte length disagrees with the
record's
payload_size; or a record declarespayload_sizebut nobinary part is supplied.
Notes
payload_checksumis a caller-supplied opaque string, stored as-is (noserver-side hashing — no hashing dep in the workspace).
.rollout.lancesuffix so a rollout store and acontext store can share a name on disk.
Test plan
cargo test --all-features— api 6, core 102 (+1 ignored), server 26cargo clippy --all-features --all-targets— cleanCo-Authored-By: Beinan Wang beinanwang@microsoft.com