Skip to content

feat: emulate Firestore read-after-write transactions - #99

Merged
trakhimenok merged 1 commit into
mainfrom
fix/memory-read-after-write
Jul 19, 2026
Merged

feat: emulate Firestore read-after-write transactions#99
trakhimenok merged 1 commit into
mainfrom
fix/memory-read-after-write

Conversation

@trakhimenok

Copy link
Copy Markdown
Contributor

Fixes #98.

Adds the opt-in dalgo2memory.WithNoReadsAfterWritesInTransaction() mode to emulate Firestore transaction ordering. When selected, reads after the first successful write return ErrReadAfterWriteInTransaction; the default memory-adapter behavior remains permissive.

Covers all read and write API variants, and documents the mode as a Firestore-compatible testing aid.

Validated with go test ./... and CGO_ENABLED=1 go test -race ./....

@trakhimenok
trakhimenok merged commit 24b364c into main Jul 19, 2026
7 checks passed
@trakhimenok
trakhimenok deleted the fix/memory-read-after-write branch July 19, 2026 20:34
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.

feat(dalgo2memory): emulate Firestore read-after-write transaction rule

1 participant