-
Notifications
You must be signed in to change notification settings - Fork 323
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Firestore - optimistic locking #171
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Documentation and perhaps updates to the sample seems to be missing.
...p-data-firestore/src/main/java/com/google/cloud/spring/data/firestore/FirestoreTemplate.java
Show resolved
Hide resolved
...rc/main/java/com/google/cloud/spring/data/firestore/mapping/FirestoreDefaultClassMapper.java
Outdated
Show resolved
Hide resolved
.../main/java/com/google/cloud/spring/data/firestore/mapping/FirestorePersistentEntityImpl.java
Outdated
Show resolved
Hide resolved
...-data-firestore/src/main/java/com/google/cloud/spring/data/firestore/mapping/UpdateTime.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed in person,
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Based on the in person review it looks good on my end.
However it looks like the integration tests may have broken; the error appears related to this feature:
Error: writeReadDeleteTest Time elapsed: 3.249 s <<< ERROR!
io.grpc.StatusRuntimeException: FAILED_PRECONDITION: the stored version (0) does not match the required base version (1607632501741884)
…gcp into firestore-optimistic-locking
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remaining items:
- documentation
- check transaction error message
this.firestoreTemplate.saveAll(Flux.just(bob)).as(operator::transactional).collectList() | ||
.as(operator::transactional) | ||
.as(StepVerifier::create) | ||
.expectError() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to check the cause such that it is due to violation of optimistic locking.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Created #187 to track this.
Kudos, SonarCloud Quality Gate passed! |
Fixes: spring-attic/spring-cloud-gcp#2498