photoncloud-monorepo/specifications/flaredb/003-kvs-consistency/contracts/kv_raw.md

815 B

KvRaw contracts (eventual consistency)

RawPut

  • RPC: kvrpc.KvRaw/RawPut
  • Request:
    • namespace: string (empty => default)
    • key: bytes
    • value: bytes
  • Response:
    • success: bool
  • Semantics:
    • Allowed only for namespaces in eventual mode; returns FailedPrecondition otherwise.
    • Writes locally with LWW timestamp prefix and queues best-effort async replication via Raft when a leader is present.

RawGet

  • RPC: kvrpc.KvRaw/RawGet
  • Request:
    • namespace: string (empty => default)
    • key: bytes
  • Response:
    • found: bool
    • value: bytes (empty if not found)
  • Semantics:
    • Allowed only for eventual namespaces; returns FailedPrecondition otherwise.
    • Returns value decoded from LWW-encoded payload (drops the timestamp).