Skip to content
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

Merged
merged 1 commit into from
Jul 15, 2022

Conversation

danthev
Copy link
Contributor

@danthev danthev commented Jul 6, 2022

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.


Java tests

@danthev
Copy link
Contributor Author

danthev commented Jul 6, 2022

R: @yixiaoshen
R: @clement

@yixiaoshen
Copy link
Contributor

LGTM. please also get a review from someone else.

@danthev
Copy link
Contributor Author

danthev commented Jul 8, 2022

R: @johnjcasey
(yixiaoshen@ has approved, review by clem@ still pending)

@johnjcasey
Copy link
Contributor

Nothing looks bad to me, but a lot of this is firestore specific, so its hard to judge from a BeamIO perspective

@danthev
Copy link
Contributor Author

danthev commented Jul 12, 2022

Code is ready again, fixed some spotless errors after adding all the unit tests, filter sorting etc.

@danthev danthev force-pushed the fix/beam_fs_query_resume branch from 73ed328 to c314775 Compare July 12, 2022 23:02
@danthev danthev force-pushed the fix/beam_fs_query_resume branch from c314775 to ad3af31 Compare July 12, 2022 23:30
Copy link
Contributor

@johnjcasey johnjcasey left a 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

@johnjcasey
Copy link
Contributor

@pabloem @chamikaramj for final pass & merge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants