Skip to content

Add ReadTime to MutableDocument #5925

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
Jan 28, 2022
Merged

Conversation

schmidt-sebastian
Copy link
Contributor

@schmidt-sebastian schmidt-sebastian commented Jan 24, 2022

Indexing needs a readTime on MutableDocument. This PR adds this and cleans up a bunch of callsites to use the new read time.

@changeset-bot
Copy link

changeset-bot bot commented Jan 24, 2022

⚠️ No Changeset found

Latest commit: 3883ff4

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

@github-actions
Copy link
Contributor

github-actions bot commented Jan 24, 2022

Changeset File Check ✅

  • No modified packages are missing from the changeset file.
  • No changeset formatting errors detected.

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Jan 24, 2022

Size Report 1

Affected Products

  • @firebase/analytics

    TypeBase (222f264)Merge (0532822)Diff
    browser?18.9 kB? (?)
    esm5?23.5 kB? (?)
    main?24.6 kB? (?)
    module?18.9 kB? (?)
  • @firebase/analytics-compat

    TypeBase (222f264)Merge (0532822)Diff
    browser?2.57 kB? (?)
    esm5?2.80 kB? (?)
    main?3.24 kB? (?)
    module?2.57 kB? (?)
  • @firebase/api-documenter

    TypeBase (222f264)Merge (0532822)Diff
    main?3.95 kB? (?)
  • @firebase/app

    TypeBase (222f264)Merge (0532822)Diff
    browser?7.74 kB? (?)
    esm5?9.37 kB? (?)
    main?10.2 kB? (?)
    module?7.74 kB? (?)
  • @firebase/app-check

    TypeBase (222f264)Merge (0532822)Diff
    browser?25.1 kB? (?)
    esm5?29.7 kB? (?)
    main?30.9 kB? (?)
    module?25.1 kB? (?)
  • @firebase/app-check-compat

    TypeBase (222f264)Merge (0532822)Diff
    browser?2.27 kB? (?)
    esm5?2.48 kB? (?)
    main?2.94 kB? (?)
    module?2.27 kB? (?)
  • @firebase/app-compat

    TypeBase (222f264)Merge (0532822)Diff
    browser?5.28 kB? (?)
    esm5?6.13 kB? (?)
    lite?4.06 kB? (?)
    main?6.73 kB? (?)
    module?5.28 kB? (?)
  • @firebase/auth-compat

    TypeBase (222f264)Merge (0532822)Diff
    browser?20.1 kB? (?)
    esm5?26.9 kB? (?)
    main?29.5 kB? (?)
    module?20.1 kB? (?)
  • @firebase/auth/cordova

    TypeBase (222f264)Merge (0532822)Diff
    browser?180 kB? (?)
    module?180 kB? (?)
  • @firebase/auth/internal

    TypeBase (222f264)Merge (0532822)Diff
    browser?163 kB? (?)
    esm5?212 kB? (?)
    main?179 kB? (?)
    module?163 kB? (?)
  • @firebase/auth/react-native

    TypeBase (222f264)Merge (0532822)Diff
    browser?164 kB? (?)
    module?164 kB? (?)
  • @firebase/component

    TypeBase (222f264)Merge (0532822)Diff
    browser?6.54 kB? (?)
    esm5?8.61 kB? (?)
    main?8.99 kB? (?)
    module?6.54 kB? (?)
  • @firebase/database

    TypeBase (222f264)Merge (0532822)Diff
    browser?247 kB? (?)
    esm5?275 kB? (?)
    main?280 kB? (?)
    module?247 kB? (?)
  • @firebase/database-compat

    TypeBase (222f264)Merge (0532822)Diff
    browser?17.9 kB? (?)
    esm5?21.0 kB? (?)
    main?21.7 kB? (?)
    module?17.9 kB? (?)
  • @firebase/database-compat/standalone

    TypeBase (222f264)Merge (0532822)Diff
    main?369 kB? (?)
  • @firebase/firestore

    TypeBase (222f264)Merge (0532822)Diff
    browser?229 kB? (?)
    esm5?286 kB? (?)
    main?455 kB? (?)
    module?229 kB? (?)
    react-native?229 kB? (?)
  • @firebase/firestore-compat

    TypeBase (222f264)Merge (0532822)Diff
    browser?20.5 kB? (?)
    esm5?27.6 kB? (?)
    main?20.9 kB? (?)
    module?20.5 kB? (?)
    react-native?20.5 kB? (?)
  • @firebase/firestore-lite

    TypeBase (222f264)Merge (0532822)Diff
    browser?72.7 kB? (?)
    esm5?85.9 kB? (?)
    main?125 kB? (?)
    module?72.7 kB? (?)
    react-native?72.9 kB? (?)
  • @firebase/functions

    TypeBase (222f264)Merge (0532822)Diff
    browser?8.99 kB? (?)
    esm5?11.1 kB? (?)
    main?11.8 kB? (?)
    module?8.99 kB? (?)
  • @firebase/functions-compat

    TypeBase (222f264)Merge (0532822)Diff
    browser?1.67 kB? (?)
    esm5?1.83 kB? (?)
    main?2.20 kB? (?)
    module?1.67 kB? (?)
  • @firebase/installations

    TypeBase (222f264)Merge (0532822)Diff
    browser?17.3 kB? (?)
    esm5?22.3 kB? (?)
    main?23.1 kB? (?)
    module?17.3 kB? (?)
  • @firebase/installations-compat

    TypeBase (222f264)Merge (0532822)Diff
    browser?944 B? (?)
    esm5?1.16 kB? (?)
    main?1.48 kB? (?)
    module?944 B? (?)
  • @firebase/logger

    TypeBase (222f264)Merge (0532822)Diff
    esm5?4.65 kB? (?)
    main?5.32 kB? (?)
    module?3.25 kB? (?)
  • @firebase/messaging

    TypeBase (222f264)Merge (0532822)Diff
    browser?20.8 kB? (?)
    esm5?26.1 kB? (?)
    main?26.8 kB? (?)
    module?20.8 kB? (?)
  • @firebase/messaging-compat

    TypeBase (222f264)Merge (0532822)Diff
    browser?2.08 kB? (?)
    esm5?2.51 kB? (?)
    main?2.90 kB? (?)
    module?2.08 kB? (?)
  • @firebase/messaging-sw

    TypeBase (222f264)Merge (0532822)Diff
    main?29.5 kB? (?)
    module?22.8 kB? (?)
  • @firebase/performance

    TypeBase (222f264)Merge (0532822)Diff
    browser?28.5 kB? (?)
    esm5?30.2 kB? (?)
    main?30.6 kB? (?)
    module?28.5 kB? (?)
  • @firebase/performance-compat

    TypeBase (222f264)Merge (0532822)Diff
    browser?1.10 kB? (?)
    esm5?1.37 kB? (?)
    main?1.69 kB? (?)
    module?1.10 kB? (?)
  • @firebase/remote-config

    TypeBase (222f264)Merge (0532822)Diff
    browser?18.8 kB? (?)
    esm5?23.7 kB? (?)
    main?24.9 kB? (?)
    module?18.8 kB? (?)
  • @firebase/remote-config-compat

    TypeBase (222f264)Merge (0532822)Diff
    browser?1.85 kB? (?)
    esm5?2.76 kB? (?)
    main?3.09 kB? (?)
    module?1.85 kB? (?)
  • @firebase/rules-unit-testing

    TypeBase (222f264)Merge (0532822)Diff
    main?17.6 kB? (?)
  • @firebase/storage

    TypeBase (222f264)Merge (0532822)Diff
    browser?54.5 kB? (?)
    esm5?60.5 kB? (?)
    main?57.3 kB? (?)
    module?54.5 kB? (?)
  • @firebase/storage-compat

    TypeBase (222f264)Merge (0532822)Diff
    browser?5.67 kB? (?)
    esm5?8.41 kB? (?)
    main?8.82 kB? (?)
    module?5.67 kB? (?)
  • @firebase/util

    TypeBase (222f264)Merge (0532822)Diff
    browser?20.5 kB? (?)
    esm5?21.9 kB? (?)
    main?26.7 kB? (?)
    module?20.5 kB? (?)
  • @firebase/webchannel-wrapper

    TypeBase (222f264)Merge (0532822)Diff
    esm5?44.7 kB? (?)
    main?50.8 kB? (?)
    module?43.2 kB? (?)
  • bundle

    43 size changes

    TypeBase (222f264)Merge (0532822)Diff
    analytics (logEvent)?34.7 kB? (?)
    app-check (CustomProvider)?27.4 kB? (?)
    app-check (ReCaptchaEnterpriseProvider)?29.6 kB? (?)
    app-check (ReCaptchaV3Provider)?29.6 kB? (?)
    auth (Anonymous)?56.9 kB? (?)
    auth (EmailAndPassword)?61.0 kB? (?)
    auth (GoogleFBTwitterGitHubPopup)?80.8 kB? (?)
    auth (GooglePopup)?80.5 kB? (?)
    auth (GoogleRedirect)?80.7 kB? (?)
    auth (Phone)?67.0 kB? (?)
    database (Append to a list of data)?137 kB? (?)
    database (Filtering data)?136 kB? (?)
    database (Listen for child events)?152 kB? (?)
    database (Listen for value events + Detach listeners)?152 kB? (?)
    database (Listen for value events)?152 kB? (?)
    database (Read data once)?144 kB? (?)
    database (Save data as transactions)?154 kB? (?)
    database (Sort data)?138 kB? (?)
    database (Write data)?136 kB? (?)
    firestore (Persistence)?230 kB? (?)
    firestore (Query Cursors)?189 kB? (?)
    firestore (Query)?190 kB? (?)
    firestore (Read data once)?179 kB? (?)
    firestore (Realtime updates)?181 kB? (?)
    firestore (Transaction)?163 kB? (?)
    firestore (Write data)?163 kB? (?)
    firestore-lite (Query Cursors)?56.5 kB? (?)
    firestore-lite (Query)?59.6 kB? (?)
    firestore-lite (Read data once)?44.1 kB? (?)
    firestore-lite (Transaction)?61.5 kB? (?)
    firestore-lite (Write data)?46.9 kB? (?)
    functions (call)?18.3 kB? (?)
    messaging (send + receive)?37.8 kB? (?)
    performance (trace)?42.3 kB? (?)
    remote-config (getAndFetch)?36.7 kB? (?)
    storage (getBytes)?26.6 kB? (?)
    storage (getDownloadURL)?28.7 kB? (?)
    storage (getMetadata)?28.1 kB? (?)
    storage (list + listAll)?27.5 kB? (?)
    storage (updateMetadata)?28.4 kB? (?)
    storage (uploadBytes)?32.9 kB? (?)
    storage (uploadBytesResumable)?42.4 kB? (?)
    storage (uploadString)?33.1 kB? (?)

  • firebase

    29 size changes

    TypeBase (222f264)Merge (0532822)Diff
    firebase-analytics-compat.js?26.0 kB? (?)
    firebase-analytics.js?107 kB? (?)
    firebase-app-check-compat.js?22.7 kB? (?)
    firebase-app-check.js?89.9 kB? (?)
    firebase-app-compat.js?17.9 kB? (?)
    firebase-app.js?51.4 kB? (?)
    firebase-auth-compat.js?123 kB? (?)
    firebase-auth-cordova.js?462 kB? (?)
    firebase-auth-react-native.js?486 kB? (?)
    firebase-auth.js?411 kB? (?)
    firebase-compat.js?754 kB? (?)
    firebase-database-compat.js?165 kB? (?)
    firebase-database.js?603 kB? (?)
    firebase-firestore-compat.js?281 kB? (?)
    firebase-firestore-lite.js?249 kB? (?)
    firebase-firestore.js?772 kB? (?)
    firebase-functions-compat.js?7.95 kB? (?)
    firebase-functions.js?31.1 kB? (?)
    firebase-messaging-compat.js?37.9 kB? (?)
    firebase-messaging-sw.js?102 kB? (?)
    firebase-messaging.js?101 kB? (?)
    firebase-performance-compat.js?30.8 kB? (?)
    firebase-performance-standalone-compat.es2017.js?78.9 kB? (?)
    firebase-performance-standalone-compat.js?57.0 kB? (?)
    firebase-performance.js?119 kB? (?)
    firebase-remote-config-compat.js?27.5 kB? (?)
    firebase-remote-config.js?109 kB? (?)
    firebase-storage-compat.js?38.2 kB? (?)
    firebase-storage.js?146 kB? (?)

  • functions

    TypeBase (222f264)Merge (0532822)Diff
    main?46 B? (?)

Test Logs

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

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Jan 24, 2022

Size Analysis Report 1

This report is too large (403,658 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/gYFCH8DisX.html

@schmidt-sebastian
Copy link
Contributor Author

@wu-hui Do you have time to look at this?

@@ -331,16 +334,15 @@ class IndexedDbRemoteDocumentCacheImpl implements IndexedDbRemoteDocumentCache {
}

/**
* Decodes `remoteDoc` and returns the document (or null, if the document
* corresponds to the format used for sentinel deletes).
* Decodes `remoteDoc` and returns the document (or an invalid document if
Copy link
Contributor

Choose a reason for hiding this comment

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

dbRemoteDoc

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

Comment on lines 28 to 30
/**
* Represents a document change to be applied to remote document cache.
*/
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 deleted as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, thanks for catching

@wu-hui wu-hui assigned schmidt-sebastian and unassigned wu-hui Jan 28, 2022
@schmidt-sebastian schmidt-sebastian merged commit fad3c47 into master Jan 28, 2022
@schmidt-sebastian schmidt-sebastian deleted the mrschmidt/readtime branch January 28, 2022 18:25
@firebase firebase locked and limited conversation to collaborators Feb 28, 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.

3 participants