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

feat: Logical termination for firestore.getAll(...). #1517

Merged
merged 4 commits into from
Jan 10, 2024

Conversation

ehsannas
Copy link
Contributor

@ehsannas ehsannas commented Jan 5, 2024

No description provided.

@product-auto-label product-auto-label bot added size: s Pull request size is small. api: firestore Issues related to the googleapis/java-firestore API. labels Jan 5, 2024
@ehsannas ehsannas requested a review from cherylEnkidu January 5, 2024 01:04
@ehsannas ehsannas marked this pull request as ready for review January 5, 2024 01:07
@ehsannas ehsannas requested a review from a team as a code owner January 5, 2024 01:07
@ehsannas
Copy link
Contributor Author

ehsannas commented Jan 5, 2024

This improves the performance for 2 cases:

(1)

firestore.getAll(docRef1, docRef2, docRef3).get()

we know we expect 3 responses, so we can return the result after we receive 3 docs.

(2)

docRef.get().get()

This simply calls firestore.getAll(docRef) under the hood. We know we expect 1 document result, so we can return the result as soon as we receive 1 document

(b/309863147)

Copy link
Contributor

@cherylEnkidu cherylEnkidu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Ehsan, I change the unit tests to verify the changes. Please only merge the PR If my changes look good to you,

@cherylEnkidu cherylEnkidu added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 5, 2024
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 5, 2024
@cherylEnkidu cherylEnkidu added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 6, 2024
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 6, 2024
@cherylEnkidu cherylEnkidu assigned ehsannas and unassigned cherylEnkidu Jan 8, 2024
@cherylEnkidu
Copy link
Contributor

Hi @ehsannas , please verify my latest fix before merging the PR. Thank you!

@ehsannas ehsannas merged commit c6448fc into main Jan 10, 2024
23 checks passed
@ehsannas ehsannas deleted the ehsann/fix-logical-termination branch January 10, 2024 23:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: firestore Issues related to the googleapis/java-firestore API. size: s Pull request size is small.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants