Skip to content

[v0.4.1] Remove per-bucket object journal serialization from unrelated MVCC mutations #230

Description

@zcourts

Problem

Every object mutation in a tenant bucket currently observes and rewrites two shared per-bucket stream heads and sequential event rows:

  • object_watch:tenant:<id>:bucket:<id>
  • object_metadata:tenant:<id>:bucket:<id>

plan_object_watch_appends and plan_metadata_events bind those shared head values and preallocated sequence rows into the user transaction snapshot. Concurrent mutations of unrelated object keys therefore certify as TransactionPointConflict. A steady but modest background writer can starve an unrelated multi-object control transaction through all client retries.

Production evidence

Worka HMO AMD64 E2E attempt 23 retried a three-object template trust mutation eight times. Persisted prepared bundles mapped every conflict hash to one of the two shared journal heads or their sequential record rows; none mapped to the trust, audit, or claim objects being mutated. The same failure reproduced on native ARM and AMD64 emulation.

Required architecture

  • Mutations of unrelated object keys must not serialize on a per-bucket global head.
  • Object mutation and durable watch/metadata evidence remain atomic.
  • Watch ordering/cursors and tamper evidence remain correct across Raft apply and replay.
  • Do not resolve this by dropping journal predicates, last-write-wins head updates, disabling watches, or requiring Worka to suppress normal concurrent writes.

Acceptance

  • A regression opens concurrent transactions against different object keys in one bucket and both can commit without a journal-head point conflict.
  • Same-key/precondition conflicts still abort correctly.
  • Watch and metadata readers return complete, deterministic ordered history after concurrent commits.
  • Hash/tamper validation and replay tests pass.
  • Worka template trust mutation commits while normal device/build liveness traffic is active.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:mvccMVCC storage, snapshots, conflicts, application, or GCkind:bugConfirmed defect requiring correctionrelease-blockerMust be resolved before the assigned release shipsrfc:mvcc-under-raftImplements docs/rfcs/mvcc_under_raft.md

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions