Skip to content

Fix #2822: consistent write timing between refs and WriteBatch #2823

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

Merged
merged 1 commit into from
Mar 30, 2020
Merged

Fix #2822: consistent write timing between refs and WriteBatch #2823

merged 1 commit into from
Mar 30, 2020

Conversation

SamyPesse
Copy link
Contributor

This PR fixes #2822.

It ensures this._firestore.ensureClientConfigured().write(this._mutations); is being executed in the same event loop as the call of batch.commit().

Copy link
Contributor

@schmidt-sebastian schmidt-sebastian left a comment

Choose a reason for hiding this comment

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

Thank you for this fix! We probably have to audit the rest of our API surface to see if there are similar problems, but we can merge this as is to unblock your development.

@schmidt-sebastian schmidt-sebastian merged commit bd85150 into firebase:master Mar 30, 2020
@firebase firebase locked and limited conversation to collaborators Apr 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

WriteBatch.commit cannot be used in a sync way
2 participants