Skip to content

fix: enforce read-before-write in transaction execute()#2358

Merged
wu-hui merged 1 commit intomainfrom
execute-read-before-write
Apr 15, 2026
Merged

fix: enforce read-before-write in transaction execute()#2358
wu-hui merged 1 commit intomainfrom
execute-read-before-write

Conversation

@wu-hui
Copy link
Copy Markdown
Contributor

@wu-hui wu-hui commented Apr 14, 2026

This PR ensures that Pipeline.execute() calls within a transaction follow the requirement that all reads must occur before any writes.

Previously, this check was missing from the execute() methods in ServerSideTransaction.java, allowing pipelines to be executed after writes had already been buffered.

Added a regression test in TransactionTest.java.

Ensures that Pipeline.execute() calls within a transaction follow the
requirement that all reads must occur before any writes. Previously,
this check was missing from the execute() methods in
ServerSideTransaction.
@wu-hui wu-hui requested a review from a team as a code owner April 14, 2026 14:13
@product-auto-label product-auto-label Bot added size: s Pull request size is small. api: firestore Issues related to the googleapis/java-firestore API. labels Apr 14, 2026
@wu-hui wu-hui requested a review from dlarocque April 14, 2026 14:59
@wu-hui wu-hui merged commit 71eab7b into main Apr 15, 2026
28 checks passed
@wu-hui wu-hui deleted the execute-read-before-write branch April 15, 2026 15:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: firestore Issues related to the googleapis/java-firestore API. size: s Pull request size is small.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants