Skip to content

Overlay migration #6131

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 4 commits into from
May 2, 2022
Merged

Overlay migration #6131

merged 4 commits into from
May 2, 2022

Conversation

ehsannas
Copy link
Contributor

@ehsannas ehsannas commented Apr 8, 2022

No description provided.

@changeset-bot
Copy link

changeset-bot bot commented Apr 8, 2022

⚠️ No Changeset found

Latest commit: 47d6057

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@ehsannas ehsannas force-pushed the ehsann/overlay-migration-2 branch from 71f0862 to 0a979d0 Compare April 8, 2022 18:33
@google-oss-bot
Copy link
Contributor

google-oss-bot commented Apr 8, 2022

Size Report 1

Affected Products

  • @firebase/firestore

    TypeBase (104964e)Merge (fba948f)Diff
    browser255 kB255 kB+671 B (+0.3%)
    esm5316 kB317 kB+794 B (+0.3%)
    main510 kB512 kB+1.78 kB (+0.3%)
    module255 kB255 kB+671 B (+0.3%)
    react-native255 kB255 kB+671 B (+0.3%)
  • bundle

    TypeBase (104964e)Merge (fba948f)Diff
    firestore (Persistence)265 kB265 kB+673 B (+0.3%)
  • firebase

    TypeBase (104964e)Merge (fba948f)Diff
    firebase-compat.js781 kB782 kB+675 B (+0.1%)
    firebase-firestore-compat.js306 kB307 kB+675 B (+0.2%)
    firebase-firestore.js828 kB830 kB+1.37 kB (+0.2%)

Test Logs

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

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Apr 8, 2022

Size Analysis Report 1

This report is too large (410,370 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/daiRHnxhsr.html

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.

Hm, I thought I would not like this approach but it is actually cleaner that your other proposal. I will let you pick one and will do my next round of reviews when we have a winner + some tests :)

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.

LG. Please make sure to run at least one manual test for this upgrade.

batchId: 5,
localWriteTimeMs: 1337,
baseMutations: undefined,
mutations: [testWritePending]
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this be user3 with no mutations?

}
).next(() =>
// Populate the mutation queues' metadata
PersistencePromise.waitFor([
Copy link
Contributor

Choose a reason for hiding this comment

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

You can probably use the loop above to also add this data and then just simply call .put({userId: user, lastAcknowledgedBatchId: -1, lastStreamToken: ''}) at each iteration. That way you only have one source of truth for your data.

@ehsannas ehsannas merged commit bdd3eae into firestore-overlays May 2, 2022
@ehsannas ehsannas deleted the ehsann/overlay-migration-2 branch May 2, 2022 14:47
ehsannas added a commit that referenced this pull request May 19, 2022
* Integrate Document Overlay with the SDK (#6123)

* Integrate Document Overlay with the SDK.

* we should call ObjectValue.delete if value is null.

* Remove unnecessary null check from MemoryDocumentOverlayCache.saveOverlay(), like is done in firebase/firebase-android-sdk#3518

* Address comments.

* Port changes from Android SDK PR#3420.

Note that we are not going to do any processing in the background.

* Port overlay recalculation bug (Android SDK PR #3495).

* Fix overlay bug when offline (Port Android SDK PR #3537).

* Address feedback.

* Better null check.

Co-authored-by: Denver Coneybeare <[email protected]>

* Overlay migration (#6131)

* Overlay migration

* Remove intermediate state.

* Add test.

* Address feedback.

* Update overlay migration code to use DbMutationBatchStore (#6268)

* wip.

* remove console.log.

* remove .only for test.

* lint fixes.

* Backport overlay bug fixes (Android PR 3691 3623) (#6274)

* Porting Android PR #3623.

* Port Android PR #3691.

* address feedback and add missing tests.

Co-authored-by: Denver Coneybeare <[email protected]>
@firebase firebase locked and limited conversation to collaborators Jun 2, 2022
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.

3 participants