-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
[BEAM-22089] Fix query retry in Java FirestoreIO #22175
Conversation
R: @yixiaoshen |
...d-platform/src/test/java/org/apache/beam/sdk/io/gcp/firestore/FirestoreV1FnRunQueryTest.java
Outdated
Show resolved
Hide resolved
...d-platform/src/test/java/org/apache/beam/sdk/io/gcp/firestore/FirestoreV1FnRunQueryTest.java
Outdated
Show resolved
Hide resolved
...d-platform/src/test/java/org/apache/beam/sdk/io/gcp/firestore/FirestoreV1FnRunQueryTest.java
Outdated
Show resolved
Hide resolved
.../io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/firestore/QueryUtils.java
Show resolved
Hide resolved
.../io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/firestore/QueryUtils.java
Outdated
Show resolved
Hide resolved
.../io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/firestore/QueryUtils.java
Outdated
Show resolved
Hide resolved
.../io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/firestore/QueryUtils.java
Outdated
Show resolved
Hide resolved
.../io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/firestore/QueryUtils.java
Outdated
Show resolved
Hide resolved
...gle-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/firestore/FirestoreV1ReadFn.java
Outdated
Show resolved
Hide resolved
.../io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/firestore/QueryUtils.java
Outdated
Show resolved
Hide resolved
...d-platform/src/test/java/org/apache/beam/sdk/io/gcp/firestore/FirestoreV1FnRunQueryTest.java
Outdated
Show resolved
Hide resolved
LGTM. please also get a review from someone else. |
R: @johnjcasey |
Nothing looks bad to me, but a lot of this is firestore specific, so its hard to judge from a BeamIO perspective |
...gle-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/firestore/FirestoreV1ReadFn.java
Outdated
Show resolved
Hide resolved
...gle-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/firestore/FirestoreV1ReadFn.java
Outdated
Show resolved
Hide resolved
...gle-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/firestore/FirestoreV1ReadFn.java
Outdated
Show resolved
Hide resolved
...gle-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/firestore/FirestoreV1ReadFn.java
Outdated
Show resolved
Hide resolved
...gle-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/firestore/FirestoreV1ReadFn.java
Outdated
Show resolved
Hide resolved
...gle-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/firestore/FirestoreV1ReadFn.java
Outdated
Show resolved
Hide resolved
.../io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/firestore/QueryUtils.java
Outdated
Show resolved
Hide resolved
.../io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/firestore/QueryUtils.java
Outdated
Show resolved
Hide resolved
.../io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/firestore/QueryUtils.java
Show resolved
Hide resolved
.../io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/firestore/QueryUtils.java
Show resolved
Hide resolved
.../io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/firestore/QueryUtils.java
Outdated
Show resolved
Hide resolved
.../io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/firestore/QueryUtils.java
Outdated
Show resolved
Hide resolved
...gle-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/firestore/FirestoreV1ReadFn.java
Outdated
Show resolved
Hide resolved
Code is ready again, fixed some spotless errors after adding all the unit tests, filter sorting etc. |
.../io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/firestore/QueryUtils.java
Outdated
Show resolved
Hide resolved
.../io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/firestore/QueryUtils.java
Outdated
Show resolved
Hide resolved
...google-cloud-platform/src/test/java/org/apache/beam/sdk/io/gcp/firestore/QueryUtilsTest.java
Show resolved
Hide resolved
.../io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/firestore/QueryUtils.java
Outdated
Show resolved
Hide resolved
73ed328
to
c314775
Compare
c314775
to
ad3af31
Compare
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.
LGTM, though I think a lot of this is very low level encoding work, and should probably be pushed down to the Firestore library itself
@pabloem @chamikaramj for final pass & merge |
This fixes a condition where, when a RunQuery request is retried, the cursor inferred from the last received value is set incorrectly, potentially yielding no or skipping some results. This can happen due to nested field paths in the orderBy or when the implicit order (e.g. by name) is not filled correctly. See also #22089.
This PR fixes both root-causes along with unit test cases for each.