Skip to content

fix: report failed check indexes in AtomicWriteOutput#150

Merged
piscisaureus merged 2 commits into
mainfrom
failed-checks
Jun 6, 2026
Merged

fix: report failed check indexes in AtomicWriteOutput#150
piscisaureus merged 2 commits into
mainfrom
failed-checks

Conversation

@piscisaureus

Copy link
Copy Markdown
Member

The self-hosted server always returned an empty failed_checks list
when an atomic write failed its checks, unlike the cloud
implementation. Clients use the indexes to re-read only the
conflicting keys before retrying.

  • the sqlite backend now evaluates every check instead of stopping
    at the first failure, and returns the failing indexes
  • a new AtomicWriteOutcome enum carries the outcome through the
    inherent Sqlite::atomic_write path used by the denokv server and
    the napi bindings; the denokv_proto::Database trait is unchanged
    (its impl drops the indexes, preserving the existing interface for
    trait consumers)
  • an integration test exercises the wire format end to end

Fixes #110.

@piscisaureus piscisaureus mentioned this pull request Jun 6, 2026
5 tasks
The self-hosted server always returned an empty failed_checks list
when an atomic write failed its checks, unlike the cloud
implementation. Clients use the indexes to re-read only the
conflicting keys before retrying.

* the sqlite backend now evaluates every check instead of stopping
  at the first failure, and returns the failing indexes
* a new AtomicWriteOutcome enum carries the outcome through the
  inherent Sqlite::atomic_write path used by the denokv server and
  the napi bindings; the denokv_proto::Database trait is unchanged
  (its impl drops the indexes, preserving the existing interface for
  trait consumers)
* an integration test exercises the wire format end to end

Fixes #110.
The prose referred to AW_CHECK_FAILED and check_failures; the actual
schema names are AW_CHECK_FAILURE and failed_checks. Also fixes a
typo (interpereting).
@piscisaureus piscisaureus merged commit b63cfd9 into main Jun 6, 2026
20 checks passed
@piscisaureus piscisaureus deleted the failed-checks branch June 6, 2026 04:49
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.

AtomicWriteOutput.failed_checks is not populated when AtomicWrite checks fail

1 participant