Skip to content

docs(rfc): add RFC-0003 Backend Acceptance Criteria - #214

Open
LeeroyHannigan wants to merge 1 commit into
mainfrom
rfc/backend-acceptance-criteria
Open

docs(rfc): add RFC-0003 Backend Acceptance Criteria#214
LeeroyHannigan wants to merge 1 commit into
mainfrom
rfc/backend-acceptance-criteria

Conversation

@LeeroyHannigan

Copy link
Copy Markdown
Collaborator

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

  • I have read CONTRIBUTING.md
  • All tests pass (cargo test --workspace)
  • Code is formatted (cargo fmt --check)
  • Clippy is clean (cargo clippy -- -W clippy::pedantic)
  • I have added or updated tests for new functionality
  • I have updated documentation if behavior changed
  • Breaking changes are noted below (if any)
  • If this changes the wire protocol, Storage trait, auth model, on-disk
    format, 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.

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

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 jcshepherd left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a few minor comments below ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants