Skip to content

feat: add optimistic locking to Firestore sample app (#188)#4311

Open
mehdi0933 wants to merge 2 commits intoGoogleCloudPlatform:mainfrom
mehdi0933:fix-firestore-locking
Open

feat: add optimistic locking to Firestore sample app (#188)#4311
mehdi0933 wants to merge 2 commits intoGoogleCloudPlatform:mainfrom
mehdi0933:fix-firestore-locking

Conversation

@mehdi0933
Copy link

This PR addresses issue #188 by adding optimistic locking to the Firestore sample application.

Changes:

  • Added @Version field to the User POJO.
  • This ensures that concurrent updates to the same user document will throw an OptimisticLockingFailureException instead of silently overwriting data.

Fixes #188
.

@mehdi0933 mehdi0933 requested a review from a team as a code owner February 4, 2026 22:53
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.

Add optimistic locking to Firestore sample app

1 participant

Comments