Repository navigation
fix(datastore): resolve data race on transaction state - #12912
Merged
Merged
Conversation
bhshkh
force-pushed
the
fix/ds-beginlater-fixes
branch
from
September 17, 2025 21:36
463fa9e to
cc08883
Compare
bhshkh
enabled auto-merge (squash)
September 17, 2025 23:19
bhshkh
disabled auto-merge
September 22, 2025 20:53
bhshkh
enabled auto-merge (squash)
October 2, 2025 02:28
gkevinzheng
approved these changes
Oct 2, 2025
gcf-merge-on-green Bot
pushed a commit
that referenced
this pull request
Oct 20, 2025
🤖 I have created a release *beep* *boop* --- ## [1.21.0](https://togithub.com/googleapis/google-cloud-go/compare/datastore/v1.20.0...datastore/v1.21.0) (2025-10-20) ### Features * **datastore:** Support field transforms ([#12400](https://togithub.com/googleapis/google-cloud-go/issues/12400)) ([7defdd0](https://togithub.com/googleapis/google-cloud-go/commit/7defdd0a9817c8dfcc17d1e739e9e96680fc79ac)) ### Bug Fixes * **datastore:** Resolve data race on transaction state ([#12912](https://togithub.com/googleapis/google-cloud-go/issues/12912)) ([011b148](https://togithub.com/googleapis/google-cloud-go/commit/011b148ca07ff0464f8d9e46742211622a1a45a9)), refs [#11038](https://togithub.com/googleapis/google-cloud-go/issues/11038) * **datastore:** Upgrade gRPC service registration func ([8fffca2](https://togithub.com/googleapis/google-cloud-go/commit/8fffca2819fa3dc858c213aa0c503e0df331b084)) --- This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refactors the state locking for BeginLater transactions. This change:
Removes the racy stateLockDeferUnlock function.
Ensures all reads and writes to t.state and t.id are protected by t.stateLock.
Fixes a related logic bug where a transaction's ID was ignored if the first read operation (like Get or Run) returned an ErrNoSuchEntity.
Fixes: #11038