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

Clear the lastLimboFreeSnapshot version on existence filter mismatch #5835

Merged
merged 9 commits into from Jan 4, 2022

Conversation

schmidt-sebastian
Copy link
Contributor

@schmidt-sebastian schmidt-sebastian commented Dec 23, 2021

This fixes a problem where the SDK receives an existence filter mismatch and clears the mapping of documents to targets, but does not receive another snapshot that also clears the snapshot version (i.e. the device went in the background and did was not able to actually process a re-run of the query).

The change that this PR makes is that we always reset the lastLimboFreeSnapshot version to 0 if we get a target mismatch.

@changeset-bot
Copy link

@changeset-bot changeset-bot bot commented Dec 23, 2021

🦋 Changeset detected

Latest commit: 4388eda

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@firebase/firestore Patch
firebase Patch
@firebase/firestore-compat Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@google-oss-bot
Copy link
Contributor

@google-oss-bot google-oss-bot commented Dec 23, 2021

Size Report 1

Affected Products

  • @firebase/firestore

    TypeBase (3d8109c)Merge (41107ad)Diff
    browser227 kB228 kB+226 B (+0.1%)
    esm5284 kB285 kB+270 B (+0.1%)
    main426 kB426 kB+315 B (+0.1%)
    module227 kB228 kB+226 B (+0.1%)
    react-native228 kB228 kB+227 B (+0.1%)
  • @firebase/firestore-lite

    TypeBase (3d8109c)Merge (41107ad)Diff
    browser72.5 kB72.6 kB+155 B (+0.2%)
    esm585.7 kB85.9 kB+185 B (+0.2%)
    main125 kB125 kB+169 B (+0.1%)
    module72.5 kB72.6 kB+155 B (+0.2%)
    react-native72.7 kB72.8 kB+145 B (+0.2%)
  • bundle

    12 size changes

    TypeBase (3d8109c)Merge (41107ad)Diff
    firestore (Persistence)229 kB229 kB+197 B (+0.1%)
    firestore (Query Cursors)189 kB189 kB+197 B (+0.1%)
    firestore (Query)190 kB190 kB+197 B (+0.1%)
    firestore (Read data once)178 kB178 kB+197 B (+0.1%)
    firestore (Realtime updates)180 kB181 kB+197 B (+0.1%)
    firestore (Transaction)163 kB163 kB+117 B (+0.1%)
    firestore (Write data)162 kB162 kB+117 B (+0.1%)
    firestore-lite (Query Cursors)56.3 kB56.4 kB+117 B (+0.2%)
    firestore-lite (Query)59.4 kB59.5 kB+117 B (+0.2%)
    firestore-lite (Read data once)43.9 kB44.0 kB+117 B (+0.3%)
    firestore-lite (Transaction)61.2 kB61.4 kB+117 B (+0.2%)
    firestore-lite (Write data)46.8 kB46.9 kB+117 B (+0.2%)

  • firebase

    14 size changes

    TypeBase (3d8109c)Merge (41107ad)Diff
    firebase-analytics.js107 kB107 kB+151 B (+0.1%)
    firebase-app-check.js89.8 kB89.9 kB+151 B (+0.2%)
    firebase-app.js51.3 kB51.4 kB+151 B (+0.3%)
    firebase-auth.js411 kB411 kB+151 B (+0.0%)
    firebase-compat.js753 kB753 kB+204 B (+0.0%)
    firebase-firestore-compat.js280 kB281 kB+751 B (+0.3%)
    firebase-firestore-lite.js245 kB249 kB+3.90 kB (+1.6%)
    firebase-firestore.js766 kB770 kB+3.76 kB (+0.5%)
    firebase-functions.js30.9 kB31.1 kB+151 B (+0.5%)
    firebase-messaging-sw.js102 kB102 kB+151 B (+0.1%)
    firebase-messaging.js101 kB101 kB+151 B (+0.2%)
    firebase-performance.js119 kB119 kB+151 B (+0.1%)
    firebase-remote-config.js108 kB109 kB+151 B (+0.1%)
    firebase-storage.js145 kB146 kB+772 B (+0.5%)

Test Logs

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/3U6OgoTbIi.html

@google-oss-bot
Copy link
Contributor

@google-oss-bot google-oss-bot commented Dec 23, 2021

Size Analysis Report 1

This report is too large (1361656 characters) to be displayed here in a GitHub comment. Please use the below link to see the full report on Google Cloud Storage.

Test Logs

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/aGzgKPqBQS.html

"@firebase/firestore": patch
---

Fixed an issue that may have caused the SDK to raise incomplete snapshots when backgrounded during query execution.
Copy link
Contributor

@dconeybe dconeybe Jan 4, 2022

Choose a reason for hiding this comment

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

"may have caused" sounds to me like you are unsure that this is the root cause; however, it seems that the root cause is definitively known. Would it make sense to re-word this to imply that the buggy behavior is intermittent?

e.g. Fixed an issue that causes the SDK to sometimes raise incomplete snapshots...

(this comment was copied from the corresponding change to the Android SDK: firebase/firebase-android-sdk#3267 (comment))

Copy link
Contributor Author

@schmidt-sebastian schmidt-sebastian Jan 4, 2022

Choose a reason for hiding this comment

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

Done

@schmidt-sebastian schmidt-sebastian merged commit 7f05d22 into master Jan 4, 2022
17 of 18 checks passed
@schmidt-sebastian schmidt-sebastian deleted the mrschmidt/cleartoken branch Jan 4, 2022
@google-oss-bot google-oss-bot mentioned this pull request Jan 5, 2022
@firebase firebase locked and limited conversation to collaborators Feb 4, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants