#1356

feat: Validate bounded cache-object encoding for the OpenDAL engine

OpenXuanwoopened 1mo ago

Part of #1350. The first version needs a safe representation for its documented keys and values, not a new general codec or streaming framework. Start with the draft's String keys, Vec<u8> values and whole-object IO, reusing existing serialization where suitable.

First-version blockers

  • Document immutable key identity and exact-version source reads. Include source/object/version/range where needed, with unambiguous encoding. Verify the full key so a hash collision cannot return another key's bytes.
  • Bound object/key/value lengths and decoding allocations. Reject truncated, malformed, oversized or unsupported data; retain suitable integrity validation for the chosen format. Detectable corruption must not become a valid wrong value.
  • Coordinate whole-object buffer limits with #1353. The representation must not allocate an unbounded buffer based on a stored length field.
  • Verify supported round trips and focused boundary, collision, corruption and malformed-length cases. Preserve plain-get errors and existing source fallback behavior.

A recognizable format and the current instance's read/write agreement are sufficient for the exclusive no-recovery scope. Close this issue when the representation and these checks are integrated.

Possible follow-ups — not blockers

Generic key/value or pluggable codec support beyond the selected first-version types; streaming/range reads; cross-version persistence/recovery compatibility; and format migrations. Coordinate with #1242 or #1026 only if those capabilities are actually adopted.

The prototype's selected payload-size round trips demonstrate feasibility, not arbitrary corruption safety. Use those results where still applicable and add only the missing boundary checks.

Activity

0

No activity yet.