• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

dal-go / dalgo / 32996384041
100%

Build:
DEFAULT BRANCH: main
Ran 26 Aug 2026 05:51PM UTC
Jobs 1
Files 126
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

26 Aug 2026 05:50PM UTC coverage: 99.962%. Remained the same
32996384041

push

github

web-flow
feat(dalgo2memory): make read-write transactions atomic by default (#121)

* feat(dalgo2memory): make read-write transactions atomic by default

Firestore discards every write of a transaction whose callback returns an
error. The in-memory adapter's default (whole-database lock) mode did not:
it applied writes to the storage engines as they were made, so a failed
transaction left its partial work committed for real, and there was no
option to get Firestore's behaviour.

Measured before this change:

  DEFAULT      write survives FAILED transaction = true   (Firestore: false)
  OPTIMISTIC   write survives FAILED transaction = false  (Firestore: false)

The faithful behaviour already existed, fully implemented, behind
WithOptimisticConcurrency - the same shape as the read-after-write gap
fixed in v0.67.0, where the correct semantics were present but opt-in.
This reuses that machinery for the default mode rather than writing a
second buffering implementation.

Two small pieces make the reuse work:

  - optimisticState reaches the shared store through lock/unlock instead of
    db.mu directly, so it can run under a lock the owning transaction
    already holds (sync.Mutex is not reentrant).
  - Commit-version validation and bookkeeping are gated on validateVersions,
    set only in optimistic mode. The locked mode holds db.mu for the
    callback's whole duration, so no other transaction can interleave and
    there is nothing to validate.

No read-overlay logic is required: the default noReadsAfterWritesInTransaction
rule already rejects any read following a write, so the buffer cannot be
observed. Under WithInterleavedReadsAndWritesInTransaction, where a read may
follow a write, reads DO resolve through the transaction's pending view and
see its own writes. The one case buffering cannot serve is a QUERY after a
write, since a query scans committed storage rather than resolving keys; that
is now refused with a descriptive error instead of returning a sta... (continued)

62 of 62 new or added lines in 2 files covered. (100.0%)

7861 of 7864 relevant lines covered (99.96%)

1.0 hits per line

Jobs
ID Job ID Ran Files Coverage
1 32996384041.1 26 Aug 2026 05:51PM UTC 126
99.96
GitHub Action Run
Source Files on build 32996384041
  • Tree
  • List 126
  • Changed 3
  • Source Changed 0
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • db3a1c12 on github
  • Prev Build on main (#32966146720)
  • Next Build on main (#33000904053)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc