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

dal-go / dalgo / 33002534404
100%

Build:
DEFAULT BRANCH: main
Ran 26 Aug 2026 06:58PM 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 06:57PM UTC coverage: 99.962%. Remained the same
33002534404

push

github

web-flow
feat(dalgo2memory): forbid nested read-write transactions, matching Firestore (#125)

Real Firestore's Go client refuses a transaction started from inside another
transaction's callback: cloud.google.com/go/firestore's Client.RunTransaction
checks a transactionInProgressKey context value before it even looks at
either side's read-only flag, so the rejection covers all four
read-only/read-write nesting combinations identically, not just
read-write-in-read-write.

Before this, dalgo2memory got both wrong: the default whole-database-lock
RunReadwriteTransaction holds db.mu for its callback's entire duration, so a
nested RunReadwriteTransaction call deadlocked trying to re-acquire it
(sync.RWMutex is not reentrant); the opt-in WithOptimisticConcurrency path
holds no such lock, so the same nested call would silently succeed as an
independent, concurrently-committing transaction -- legalizing a pattern
real Firestore rejects outright. A later PR flips the default to the
optimistic machinery, which would have made the silent-success behavior the
default without this guard landing first.

Adds an unexported transactionInProgressKey context marker (the same idiom
Firestore's own client uses) that RunReadwriteTransaction and
RunReadonlyTransaction both check on entry and both stamp onto the context
handed to their callback, and an exported ErrNestedTransaction sentinel
whose doc comment documents the Firestore-parity evidence, why a rejected
nesting does not poison the outer transaction, and dal.GetNonTransactionalContext
as the sanctioned escape for intentionally starting an independent
transaction.

Verifies: nested rw-in-rw is rejected promptly (no deadlock) in both
transaction modes; ro-in-rw, rw-in-ro and ro-in-ro are rejected too, per the
Firestore-client evidence; the outer transaction discards its writes when it
treats the nested error as fatal, and still commits when it swallows the
error (not poisoning, matching the real client); and
dal.GetNonTransac... (continued)

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

7938 of 7941 relevant lines covered (99.96%)

1.0 hits per line

Jobs
ID Job ID Ran Files Coverage
1 33002534404.1 26 Aug 2026 06:58PM UTC 126
99.96
GitHub Action Run
Source Files on build 33002534404
  • Tree
  • List 126
  • Changed 2
  • Source Changed 0
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 9d42507a on github
  • Prev Build on main (#33002396729)
  • Next Build on main (#33004137529)
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