Skip to content

Change the order of checks in applyRemoteEvent() #802

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 2 commits into from
Sep 13, 2019

Conversation

schmidt-sebastian
Copy link
Contributor

@schmidt-sebastian schmidt-sebastian commented Sep 13, 2019

If there is a chance that a limbo resolution fails for a document that no longer exists, we could get into a state where we write a document into the RemoteDocumentCache with a snapshot version of zero. By re-ordering the statements, we make sure this does not happen

If there is a chance that a limbo resolution fails for a documnet that no longer exist, we could get into a state where we wrote a document into the RemoteDocumentCache with a snapshot version of zero. By re-ordering the statements, we make sure this does not happen
Copy link
Contributor

@wilhuff wilhuff left a comment

Choose a reason for hiding this comment

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

LGTM

// rejected limbo resolutions (which fabricate NoDocuments with SnapshotVersion.NONE)
// never add documents to cache.
if (doc instanceof NoDocument && doc.getVersion().equals(SnapshotVersion.NONE)) {
// NoDocuments with SnapshotVersion.MIN are used in manufactured events. We remove
Copy link
Contributor

Choose a reason for hiding this comment

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

s/MIN/NONE/?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

@wilhuff wilhuff assigned schmidt-sebastian and unassigned wilhuff Sep 13, 2019
@schmidt-sebastian schmidt-sebastian merged commit 5e06078 into master Sep 13, 2019
@rlazo rlazo deleted the mrschmidt/fixorder branch October 3, 2019 14:44
@firebase firebase locked and limited conversation to collaborators Oct 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla: yes Override cla size/S
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants