docs(rfc): add RFC-0003 Backend Acceptance Criteria - #214
Conversation
Define the concrete DynamoDB-behavioral invariants and implementation standards every storage backend must satisfy before acceptance, complementing RFC-0002 (process) with the storage-layer substance: item identity, secondary indexes, transactions, concurrency/isolation, streams, condition expressions, query/scan, multi-tenancy, error fidelity, and operational correctness. The conformance section makes the full Python (pytest + comprehensive) and Rust (unit + integration) suites co-equal mandatory gates. Reference the RFC from every backend-contributor entry point: CONTRIBUTING.md, README.md, the RFC index (also fixes the broken 0002 link), RFC-0002's conformance requirement and acceptance checklist, and the storage component design doc. Signed-off-by: Lee Hannigan <lhnng@amazon.com>
|
|
||
| These criteria were distilled from the review of several backend RFCs, which revealed ten classes of behavioral divergence that a process-focused policy alone did not prevent. | ||
|
|
||
| ## Motivation |
There was a problem hiding this comment.
I wonder if we need to have a tenet or a "litmus test" that summarizes what we're shooting for here: something like "Any application that runs on ExtendDB will run on DynamoDB with no unexpected behavioral changes other than per-call latency differences." Hmm. Not sure if that's clarifying or not.
|
|
||
| **1.3. Numeric precision.** DynamoDB numbers have 38 significant digits and an exponent range of -130 to +125. The backend must either: | ||
|
|
||
| * Store numeric sort keys with at least 38 digits of precision (e.g., `BigDecimal`, arbitrary-precision decimal), OR |
There was a problem hiding this comment.
Does the ExtendDB front-end reject values outside the DynamoDB numeric range?
|
|
||
| **5.1. Atomicity with data writes.** A stream record must become visible if and only if its corresponding data write committed. A crash between a committed data write and its stream record insert must not be possible, they must be in the same atomic unit (transaction, WAL entry, etc.). | ||
|
|
||
| **5.2. Per-shard ordering.** Within a shard, records must be strictly ordered by sequence number, and a consumer paging forward must never skip a committed record. This means sequence number assignment and record visibility must be tied to commit order. A record with sequence N must not become visible to consumers before all records with sequence < N on the same shard are also visible. |
There was a problem hiding this comment.
What is meant by "strictly"? I think the second sentence is closer to what's required "sequence number assignment and record visibility must be commit-ordered with the base table write."
jcshepherd
left a comment
There was a problem hiding this comment.
a few minor comments below ...
Define the concrete DynamoDB-behavioral invariants and implementation standards every storage backend must satisfy before acceptance, complementing RFC-0002 (process) with the storage-layer substance: item identity, secondary indexes, transactions, concurrency/isolation, streams, condition expressions, query/scan, multi-tenancy, error fidelity, and operational correctness. The conformance section makes the full Python (pytest + comprehensive) and Rust (unit + integration) suites co-equal mandatory gates.
Reference the RFC from every backend-contributor entry point: CONTRIBUTING.md, README.md, the RFC index (also fixes the broken 0002 link), RFC-0002's conformance requirement and acceptance checklist, and the storage component design doc.
What
Why
Closes #
Testing done
Checklist
cargo test --workspace)cargo fmt --check)cargo clippy -- -W clippy::pedantic)Storagetrait, auth model, on-diskformat, or public CLI surface, an RFC has been accepted or is linked
below. Otherwise, an ADR captures the decision (link below).
ADR / RFC:
Breaking changes
By submitting this pull request, I confirm that my contribution is made under
the terms of the Apache License 2.0 and I agree to the Developer Certificate of
Origin (DCO). See CONTRIBUTING.md for details.