You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Invalid updateTime returned from the save operation when document does not change #2163
Describe the bug
If I use the FirestoreReactiveRepository.save method to updated an existing document that contains the same values as the document stored in the database, the field annotated with the @UpdateTime(version = true) annotation returns a new timestamp. However, the value reported by Firestore is the previous timestamp as nothing was really updated.
Sample
This behavior causes in my code a precondition error because we are passing an invalid version (timestamp in the future)
"message": "FAILED_PRECONDITION: the stored version (1694626589979859) does not match the required base version (1694626366831818)",
Version
spring-cloud-gcp-data-firestore:3.5.3
google-cloud-firestore:3.14.0
Activity
meltsufin commentedon Sep 14, 2023
I'm able to repro with:
fix: Firestore updateTime extraction after commit
fix: Firestore updateTime extraction after commit (#2165)
fix: Firestore updateTime extraction after commit (#2165)
fix: Firestore updateTime extraction after commit (#2168)