WorryFree Computers   »   [go: up one dir, main page]

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

Firestore: Enable auto-detection of long-polling networking mode #7236

Merged
merged 25 commits into from
May 8, 2023

Conversation

dconeybe
Copy link
Contributor

Firestore has a setting named experimentalAutoDetectLongPolling which can be set to true to enable some heuristics to detect if enabling "long-polling" networking mode fixes communication problems with the Firestore backend servers. See #1674 for details.

For the past 4 years this "auto-detect" mode was opt-in; however, we now have confidence that it is safe to enable for everyone. Therefore, this PR enables the "auto-detect" mode by default. If you are experiencing networking issues you can try disabling the long-polling auto-detection by setting FirestoreSettings.experimentalAutoDetectLongPolling to false . If you do this, please open an issue in this GitHub repository to report your problems and mention "long-polling" in the issue title.

@dconeybe dconeybe self-assigned this Apr 20, 2023
@changeset-bot
Copy link
changeset-bot bot commented Apr 20, 2023

🦋 Changeset detected

Latest commit: e58f70b

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 Minor
firebase Minor
@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

@dconeybe dconeybe changed the base branch from master to dconeybe/LongPollingSettingsTests April 20, 2023 02:29
@@ -88,8 +88,11 @@ export interface FirestoreSettings extends LiteSettings {
* detect if long-polling should be used. This is very similar to
* `experimentalForceLongPolling`, but only uses long-polling if required.
*
* This setting will likely be enabled by default in future releases and
* cannot be combined with `experimentalForceLongPolling`.
* After having had a default value of `false` since its inception 4 years
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note to self: update this documentation immediately after release to mention the year "2019" instead of "4 years ago" and the actual version number instead of "the most recent release".

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Googlers see b/278957890 for details.

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggestion: Just say "since 2019" and say "and changed in mid 2023" so you don't need to worry about it later?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done. I still think I want to go back and change it to the specific version and release date so that customers can more easily correlate their issues with the release. But at least with your wording suggestion it's not as time-critical to get that change in.

@google-oss-bot
Copy link
Contributor
google-oss-bot commented Apr 20, 2023

Size Report 1

Affected Products

  • @firebase/firestore

    TypeBase (92e2279)Merge (92ccc2f)Diff
    browser286 kB286 kB-1 B (-0.0%)
    esm5355 kB355 kB+41 B (+0.0%)
    main568 kB568 kB-1 B (-0.0%)
    module286 kB286 kB-1 B (-0.0%)
    react-native286 kB286 kB-1 B (-0.0%)
  • @firebase/firestore-lite

    TypeBase (92e2279)Merge (92ccc2f)Diff
    browser88.3 kB88.3 kB-1 B (-0.0%)
    esm5106 kB106 kB+41 B (+0.0%)
    main151 kB151 kB-1 B (-0.0%)
    module88.3 kB88.3 kB-1 B (-0.0%)
    react-native88.5 kB88.5 kB-1 B (-0.0%)
  • bundle

    12 size changes

    TypeBase (92e2279)Merge (92ccc2f)Diff
    firestore (Persistence)300 kB300 kB-1 B (-0.0%)
    firestore (Query Cursors)238 kB238 kB-1 B (-0.0%)
    firestore (Query)235 kB235 kB-1 B (-0.0%)
    firestore (Read data once)223 kB223 kB-1 B (-0.0%)
    firestore (Realtime updates)225 kB225 kB-1 B (-0.0%)
    firestore (Transaction)202 kB202 kB-1 B (-0.0%)
    firestore (Write data)202 kB202 kB-1 B (-0.0%)
    firestore-lite (Query Cursors)82.6 kB82.6 kB-1 B (-0.0%)
    firestore-lite (Query)78.7 kB78.7 kB-1 B (-0.0%)
    firestore-lite (Read data once)60.9 kB60.9 kB-1 B (-0.0%)
    firestore-lite (Transaction)85.6 kB85.6 kB-1 B (-0.0%)
    firestore-lite (Write data)70.4 kB70.4 kB-1 B (-0.0%)

  • firebase

    TypeBase (92e2279)Merge (92ccc2f)Diff
    firebase-compat.js773 kB773 kB+41 B (+0.0%)
    firebase-firestore-compat.js339 kB339 kB+41 B (+0.0%)
    firebase-firestore-lite.js95.0 kB95.1 kB+41 B (+0.0%)
    firebase-firestore.js345 kB345 kB+41 B (+0.0%)

Test Logs

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

@google-oss-bot
Copy link
Contributor
google-oss-bot commented Apr 20, 2023

Size Analysis Report 1

Affected Products

  • @firebase/firestore

    • AbstractUserDataWriter

      Size

      TypeBase (92e2279)Merge (92ccc2f)Diff
      size25.6 kB25.6 kB-1 B (-0.0%)
      size-with-ext-deps95.3 kB95.3 kB-1 B (-0.0%)
    • AggregateField

      Size

      TypeBase (92e2279)Merge (92ccc2f)Diff
      size17.7 kB17.7 kB-1 B (-0.0%)
      size-with-ext-deps87.3 kB87.3 kB-1 B (-0.0%)
    • AggregateQuerySnapshot

      Size

      TypeBase (92e2279)Merge (92ccc2f)Diff
      size17.8 kB17.8 kB-1 B (-0.0%)
      size-with-ext-deps87.4 kB87.4 kB-1 B (-0.0%)
    • Bytes

      Size

      TypeBase (92e2279)Merge (92ccc2f)Diff
      size19.1 kB19.1 kB-1 B (-0.0%)
      size-with-ext-deps88.7 kB88.7 kB-1 B (-0.0%)
    • CACHE_SIZE_UNLIMITED

      Size

      TypeBase (92e2279)Merge (92ccc2f)Diff
      size17.6 kB17.6 kB-1 B (-0.0%)
      size-with-ext-deps87.2 kB87.2 kB-1 B (-0.0%)
    • CollectionReference

      Size

      TypeBase (92e2279)Merge (92ccc2f)Diff
      size21.2 kB21.2 kB-1 B (-0.0%)
      size-with-ext-deps90.8 kB90.8 kB-1 B (-0.0%)
    • DocumentReference

      Size

      TypeBase (92e2279)Merge (92ccc2f)Diff
      size21.2 kB21.2 kB-1 B (-0.0%)
      size-with-ext-deps90.8 kB90.8 kB-1 B (-0.0%)
    • DocumentSnapshot

      Size

      TypeBase (92e2279)Merge (92ccc2f)Diff
      size24.7 kB24.7 kB-1 B (-0.0%)
      size-with-ext-deps94.3 kB94.3 kB-1 B (-0.0%)
    • FieldPath

      Size

      TypeBase (92e2279)Merge (92ccc2f)Diff
      size20.3 kB20.3 kB-1 B (-0.0%)
      size-with-ext-deps89.9 kB89.9 kB-1 B (-0.0%)
    • FieldValue

      Size

      TypeBase (92e2279)Merge (92ccc2f)Diff
      size17.6 kB17.6 kB-1 B (-0.0%)
      size-with-ext-deps87.2 kB87.2 kB-1 B (-0.0%)
    • Firestore

      Size

      TypeBase (92e2279)Merge (92ccc2f)Diff
      size17.6 kB17.6 kB-1 B (-0.0%)
      size-with-ext-deps87.2 kB87.2 kB-1 B (-0.0%)
    • FirestoreError

      Size

      TypeBase (92e2279)Merge (92ccc2f)Diff
      size17.6 kB17.6 kB-1 B (-0.0%)
      size-with-ext-deps87.2 kB87.2 kB-1 B (-0.0%)
    • GeoPoint

      Size

      TypeBase (92e2279)Merge (92ccc2f)Diff
      size18.2 kB18.2 kB-1 B (-0.0%)
      size-with-ext-deps87.8 kB87.8 kB-1 B (-0.0%)
    • LoadBundleTask

      Size

      TypeBase (92e2279)Merge (92ccc2f)Diff
      size18.5 kB18.5 kB-1 B (-0.0%)
      size-with-ext-deps88.0 kB88.0 kB-1 B (-0.0%)
    • Query

      Size

      TypeBase (92e2279)Merge (92ccc2f)Diff
      size17.7 kB17.7 kB-1 B (-0.0%)
      size-with-ext-deps87.3 kB87.3 kB-1 B (-0.0%)
    • QueryCompositeFilterConstraint

      Size

      TypeBase (92e2279)Merge (92ccc2f)Diff
      size20.9 kB20.9 kB-1 B (-0.0%)
      size-with-ext-deps90.5 kB90.5 kB-1 B (-0.0%)
    • QueryConstraint

      Size

      TypeBase (92e2279)Merge (92ccc2f)Diff
      size17.6 kB17.6 kB-1 B (-0.0%)
      size-with-ext-deps87.2 kB87.2 kB-1 B (-0.0%)
    • QueryDocumentSnapshot

      Size

      TypeBase (92e2279)Merge (92ccc2f)Diff
      size24.7 kB24.7 kB-1 B (-0.0%)
      size-with-ext-deps94.3 kB94.3 kB-1 B (-0.0%)
    • QueryEndAtConstraint

      Size

      TypeBase (92e2279)Merge (92ccc2f)Diff
      size36.4 kB36.4 kB-1 B (-0.0%)
      size-with-ext-deps106 kB106 kB-1 B (-0.0%)
    • QueryFieldFilterConstraint

      Size

      TypeBase (92e2279)Merge (92ccc2f)Diff
      size42.0 kB42.0 kB-1 B (-0.0%)
      size-with-ext-deps112 kB112 kB-1 B (-0.0%)
    • QueryLimitConstraint

      Size

      TypeBase (92e2279)Merge (92ccc2f)Diff
      size18.4 kB18.4 kB-1 B (-0.0%)
      size-with-ext-deps88.0 kB88.0 kB-1 B (-0.0%)
    • QueryOrderByConstraint

      Size

      TypeBase (92e2279)Merge (92ccc2f)Diff
      size19.4 kB19.4 kB-1 B (-0.0%)
      size-with-ext-deps89.0 kB89.0 kB-1 B (-0.0%)
    • QuerySnapshot

      Size

      TypeBase (92e2279)Merge (92ccc2f)Diff
      size26.6 kB26.6 kB-1 B (-0.0%)
      size-with-ext-deps96.2 kB96.2 kB-1 B (-0.0%)
    • QueryStartAtConstraint

      Size

      TypeBase (92e2279)Merge (92ccc2f)Diff
      size36.4 kB36.4 kB-1 B (-0.0%)
      size-with-ext-deps106 kB106 kB-1 B (-0.0%)
    • SnapshotMetadata

      Size

      TypeBase (92e2279)Merge (92ccc2f)Diff
      size17.8 kB17.8 kB-1 B (-0.0%)
      size-with-ext-deps87.3 kB87.3 kB-1 B (-0.0%)
    • Timestamp

      Size

      TypeBase (92e2279)Merge (92ccc2f)Diff
      size18.8 kB18.8 kB-1 B (-0.0%)
      size-with-ext-deps88.4 kB88.4 kB-1 B (-0.0%)
    • Transaction

      Size

      TypeBase (92e2279)Merge (92ccc2f)Diff
      size51.3 kB51.3 kB-1 B (-0.0%)
      size-with-ext-deps121 kB121 kB-1 B (-0.0%)
    • WriteBatch

      Size

      TypeBase (92e2279)Merge (92ccc2f)Diff
      size48.1 kB48.1 kB-1 B (-0.0%)
      size-with-ext-deps118 kB118 kB-1 B (-0.0%)
    • _DatabaseId

      Size

      TypeBase (92e2279)Merge (92ccc2f)Diff
      size17.6 kB17.6 kB-1 B (-0.0%)
      size-with-ext-deps87.2 kB87.2 kB-1 B (-0.0%)
    • _DocumentKey

      Size

      TypeBase (92e2279)Merge (92ccc2f)Diff
      size26.9 kB26.9 kB-1 B (-0.0%)
      size-with-ext-deps96.5 kB96.5 kB-1 B (-0.0%)
    • _EmptyAppCheckTokenProvider

      Size

      TypeBase (92e2279)Merge (92ccc2f)Diff
      size17.7 kB17.7 kB-1 B (-0.0%)
      size-with-ext-deps87.3 kB87.3 kB-1 B (-0.0%)
    • _EmptyAuthCredentialsProvider

      Size

      TypeBase (92e2279)Merge (92ccc2f)Diff
      size17.6 kB17.6 kB-1 B (-0.0%)
      size-with-ext-deps87.2 kB87.2 kB-1 B (-0.0%)
    • _FieldPath

      Size

      TypeBase (92e2279)Merge (92ccc2f)Diff
      size20.0 kB20.0 kB-1 B (-0.0%)
      size-with-ext-deps89.6 kB89.6 kB-1 B (-0.0%)
    • _TestingHooks

      Size

      TypeBase (92e2279)Merge (92ccc2f)Diff
      size18.0 kB18.0 kB-1 B (-0.0%)
      size-with-ext-deps87.6 kB87.6 kB-1 B (-0.0%)
    • _cast

      Size

      TypeBase (92e2279)Merge (92ccc2f)Diff
      size18.4 kB18.4 kB-1 B (-0.0%)
      size-with-ext-deps88.0 kB88.0 kB-1 B (-0.0%)
    • _debugAssert

      Size

      TypeBase (92e2279)Merge (92ccc2f)Diff
      size17.6 kB17.6 kB-1 B (-0.0%)
      size-with-ext-deps87.2 kB87.2 kB-1 B (-0.0%)
    • _isBase64Available

      Size

      TypeBase (92e2279)Merge (92ccc2f)Diff
      size17.6 kB17.6 kB-1 B (-0.0%)
      size-with-ext-deps87.2 kB87.2 kB-1 B (-0.0%)
    • _logWarn

      Size

      TypeBase (92e2279)Merge (92ccc2f)Diff
      size17.7 kB17.7 kB-1 B (-0.0%)
      size-with-ext-deps87.3 kB87.3 kB-1 B (-0.0%)
    • _validateIsNotUsedTogether

      Size

      TypeBase (92e2279)Merge (92ccc2f)Diff
      size17.6 kB17.6 kB-1 B (-0.0%)
      size-with-ext-deps87.2 kB87.2 kB-1 B (-0.0%)
    • addDoc

      Size

      TypeBase (92e2279)Merge (92ccc2f)Diff
      size121 kB121 kB-1 B (-0.0%)
      size-with-ext-deps192 kB192 kB-1 B (-0.0%)
    • aggregateFieldEqual

      Size

      TypeBase (92e2279)Merge (92ccc2f)Diff
      size18.0 kB18.0 kB-1 B (-0.0%)
      size-with-ext-deps87.6 kB87.6 kB-1 B (-0.0%)
    • aggregateQuerySnapshotEqual

      Size

      TypeBase (92e2279)Merge (92ccc2f)Diff
      size33.9 kB33.9 kB-1 B (-0.0%)
      size-with-ext-deps104 kB104 kB-1 B (-0.0%)
    • and

      Size

      TypeBase (92e2279)Merge (92ccc2f)Diff
      size43.5 kB43.5 kB-1 B (-0.0%)
      size-with-ext-deps113 kB113 kB-1 B (-0.0%)
    • arrayRemove

      Size

      TypeBase (92e2279)Merge (92ccc2f)Diff
      size30.3 kB30.3 kB-1 B (-0.0%)
      size-with-ext-deps100 kB100 kB-1 B (-0.0%)
    • arrayUnion

      Size

      TypeBase (92e2279)Merge (92ccc2f)Diff
      size30.3 kB30.3 kB-1 B (-0.0%)
      size-with-ext-deps100 kB100 kB-1 B (-0.0%)
    • average

      Size

      TypeBase (92e2279)Merge (92ccc2f)Diff
      size21.3 kB21.3 kB-1 B (-0.0%)
      size-with-ext-deps90.9 kB90.9 kB-1 B (-0.0%)
    • clearIndexedDbPersistence

      Size

      TypeBase (92e2279)Merge (92ccc2f)Diff
      size26.4 kB26.4 kB-1 B (-0.0%)
      size-with-ext-deps96.1 kB96.1 kB-1 B (-0.0%)
    • collection

      Size

      TypeBase (92e2279)Merge (92ccc2f)Diff
      size21.9 kB21.9 kB-1 B (-0.0%)
      size-with-ext-deps91.6 kB91.6 kB-1 B (-0.0%)
    • collectionGroup

      Size

      TypeBase (92e2279)Merge (92ccc2f)Diff
      size20.9 kB20.9 kB-1 B (-0.0%)
      size-with-ext-deps90.5 kB90.5 kB-1 B (-0.0%)
    • connectFirestoreEmulator

      Size

      TypeBase (92e2279)Merge (92ccc2f)Diff
      size19.4 kB19.4 kB-1 B (-0.0%)
      size-with-ext-deps89.6 kB89.6 kB-1 B (-0.0%)
    • count

      Size

      TypeBase (92e2279)Merge (92ccc2f)Diff
      size17.7 kB17.7 kB-1 B (-0.0%)
      size-with-ext-deps87.3 kB87.3 kB-1 B (-0.0%)
    • deleteDoc

      Size

      TypeBase (92e2279)Merge (92ccc2f)Diff
      size112 kB112 kB-1 B (-0.0%)
      size-with-ext-deps183 kB183 kB-1 B (-0.0%)
    • deleteField

      Size

      TypeBase (92e2279)Merge (92ccc2f)Diff
      size18.0 kB18.0 kB-1 B (-0.0%)
      size-with-ext-deps87.6 kB87.6 kB-1 B (-0.0%)
    • disableNetwork

      Size

      TypeBase (92e2279)Merge (92ccc2f)Diff
      size101 kB101 kB-1 B (-0.0%)
      size-with-ext-deps171 kB171 kB-1 B (-0.0%)
    • doc

      Size

      TypeBase (92e2279)Merge (92ccc2f)Diff
      size22.0 kB22.0 kB-1 B (-0.0%)
      size-with-ext-deps91.6 kB91.6 kB-1 B (-0.0%)
    • documentId

      Size

      TypeBase (92e2279)Merge (92ccc2f)Diff
      size20.3 kB20.3 kB-1 B (-0.0%)
      size-with-ext-deps89.9 kB89.9 kB-1 B (-0.0%)
    • enableIndexedDbPersistence

      Size

      TypeBase (92e2279)Merge (92ccc2f)Diff
      size183 kB183 kB-1 B (-0.0%)
      size-with-ext-deps254 kB254 kB-1 B (-0.0%)
    • enableMultiTabIndexedDbPersistence

      Size

      TypeBase (92e2279)Merge (92ccc2f)Diff
      size219 kB219 kB-1 B (-0.0%)
      size-with-ext-deps291 kB291 kB-1 B (-0.0%)
    • enableNetwork

      Size

      TypeBase (92e2279)Merge (92ccc2f)Diff
      size101 kB101 kB-1 B (-0.0%)
      size-with-ext-deps171 kB171 kB-1 B (-0.0%)
    • endAt

      Size

      TypeBase (92e2279)Merge (92ccc2f)Diff
      size36.4 kB36.4 kB-1 B (-0.0%)
      size-with-ext-deps106 kB106 kB-1 B (-0.0%)
    • endBefore

      Size

      TypeBase (92e2279)Merge (92ccc2f)Diff
      size36.4 kB36.4 kB-1 B (-0.0%)
      size-with-ext-deps106 kB106 kB-1 B (-0.0%)
    • ensureFirestoreConfigured

      Size

      TypeBase (92e2279)Merge (92ccc2f)Diff
      size17.7 kB17.7 kB-1 B (-0.0%)
      size-with-ext-deps87.3 kB87.3 kB-1 B (-0.0%)
    • executeWrite

      Size

      TypeBase (92e2279)Merge (92ccc2f)Diff
      size111 kB111 kB-1 B (-0.0%)
      size-with-ext-deps182 kB182 kB-1 B (-0.0%)
    • getAggregateFromServer

      Size

      TypeBase (92e2279)Merge (92ccc2f)Diff
      size108 kB108 kB-1 B (-0.0%)
      size-with-ext-deps178 kB178 kB-1 B (-0.0%)
    • getCountFromServer

      Size

      TypeBase (92e2279)Merge (92ccc2f)Diff
      size108 kB108 kB-1 B (-0.0%)
      size-with-ext-deps178 kB178 kB-1 B (-0.0%)
    • getDoc

      Size

      TypeBase (92e2279)Merge (92ccc2f)Diff
      size142 kB142 kB-1 B (-0.0%)
      size-with-ext-deps212 kB212 kB-1 B (-0.0%)
    • getDocFromCache

      Size

      TypeBase (92e2279)Merge (92ccc2f)Diff
      size93.2 kB93.2 kB-1 B (-0.0%)
      size-with-ext-deps163 kB163 kB-1 B (-0.0%)
    • getDocFromServer

      Size

      TypeBase (92e2279)Merge (92ccc2f)Diff
      size142 kB142 kB-1 B (-0.0%)
      size-with-ext-deps212 kB212 kB-1 B (-0.0%)
    • getDocs

      Size

      TypeBase (92e2279)Merge (92ccc2f)Diff
      size144 kB144 kB-1 B (-0.0%)
      size-with-ext-deps214 kB214 kB-1 B (-0.0%)
    • getDocsFromCache

      Size

      TypeBase (92e2279)Merge (92ccc2f)Diff
      size101 kB101 kB-1 B (-0.0%)
      size-with-ext-deps171 kB171 kB-1 B (-0.0%)
    • getDocsFromServer

      Size

      TypeBase (92e2279)Merge (92ccc2f)Diff
      size144 kB144 kB-1 B (-0.0%)
      size-with-ext-deps214 kB214 kB-1 B (-0.0%)
    • getFirestore

      Size

      TypeBase (92e2279)Merge (92ccc2f)Diff
      size19.7 kB19.7 kB-1 B (-0.0%)
      size-with-ext-deps97.5 kB97.5 kB-1 B (-0.0%)
    • increment

      Size

      TypeBase (92e2279)Merge (92ccc2f)Diff
      size18.5 kB18.5 kB-1 B (-0.0%)
      size-with-ext-deps88.1 kB88.1 kB-1 B (-0.0%)
    • initializeFirestore

      Size

      TypeBase (92e2279)Merge (92ccc2f)Diff
      size18.5 kB18.5 kB-1 B (-0.0%)
      size-with-ext-deps88.6 kB88.6 kB-1 B (-0.0%)
    • limit

      Size

      TypeBase (92e2279)Merge (92ccc2f)Diff
      size18.5 kB18.5 kB-1 B (-0.0%)
      size-with-ext-deps88.1 kB88.1 kB-1 B (-0.0%)
    • limitToLast

      Size

      TypeBase (92e2279)Merge (92ccc2f)Diff
      size18.6 kB18.6 kB-1 B (-0.0%)
      size-with-ext-deps88.2 kB88.2 kB-1 B (-0.0%)
    • loadBundle

      Size

      TypeBase (92e2279)Merge (92ccc2f)Diff
      size110 kB110 kB-1 B (-0.0%)
      size-with-ext-deps180 kB180 kB-1 B (-0.0%)
    • memoryEagerGarbageCollector

      Size

      TypeBase (92e2279)Merge (92ccc2f)Diff
      size83.8 kB83.8 kB-1 B (-0.0%)
      size-with-ext-deps154 kB154 kB-1 B (-0.0%)
    • memoryLocalCache

      Size

      TypeBase (92e2279)Merge (92ccc2f)Diff
      size97.7 kB97.7 kB-1 B (-0.0%)
      size-with-ext-deps168 kB168 kB-1 B (-0.0%)
    • memoryLruGarbageCollector

      Size

      TypeBase (92e2279)Merge (92ccc2f)Diff
      size90.3 kB90.3 kB-1 B (-0.0%)
      size-with-ext-deps160 kB160 kB-1 B (-0.0%)
    • namedQuery

      Size

      TypeBase (92e2279)Merge (92ccc2f)Diff
      size86.7 kB86.7 kB-1 B (-0.0%)
      size-with-ext-deps157 kB157 kB-1 B (-0.0%)
    • onSnapshot

      Size

      TypeBase (92e2279)Merge (92ccc2f)Diff
      size144 kB144 kB-1 B (-0.0%)
      size-with-ext-deps215 kB215 kB-1 B (-0.0%)
    • onSnapshotsInSync

      Size

      TypeBase (92e2279)Merge (92ccc2f)Diff
      size134 kB134 kB-1 B (-0.0%)
      size-with-ext-deps204 kB204 kB-1 B (-0.0%)
    • or

      Size

      TypeBase (92e2279)Merge (92ccc2f)Diff
      size43.5 kB43.5 kB-1 B (-0.0%)
      size-with-ext-deps113 kB113 kB-1 B (-0.0%)
    • orderBy

      Size

      TypeBase (92e2279)Merge (92ccc2f)Diff
      size22.9 kB22.9 kB-1 B (-0.0%)
      size-with-ext-deps92.5 kB92.5 kB-1 B (-0.0%)
    • persistentLocalCache

      Size

      TypeBase (92e2279)Merge (92ccc2f)Diff
      size180 kB180 kB-1 B (-0.0%)
      size-with-ext-deps251 kB251 kB-1 B (-0.0%)
    • persistentMultipleTabManager

      Size

      TypeBase (92e2279)Merge (92ccc2f)Diff
      size216 kB216 kB-1 B (-0.0%)
      size-with-ext-deps288 kB288 kB-1 B (-0.0%)
    • persistentSingleTabManager

      Size

      TypeBase (92e2279)Merge (92ccc2f)Diff
      size179 kB179 kB-1 B (-0.0%)
      size-with-ext-deps251 kB251 kB-1 B (-0.0%)
    • query

      Size

      TypeBase (92e2279)Merge (92ccc2f)Diff
      size43.8 kB43.8 kB-1 B (-0.0%)
      size-with-ext-deps114 kB114 kB-1 B (-0.0%)
    • queryEqual

      Size

      TypeBase (92e2279)Merge (92ccc2f)Diff
      size33.8 kB33.8 kB-1 B (-0.0%)
      size-with-ext-deps103 kB103 kB-1 B (-0.0%)
    • refEqual

      Size

      TypeBase (92e2279)Merge (92ccc2f)Diff
      size21.4 kB21.4 kB-1 B (-0.0%)
      size-with-ext-deps91.1 kB91.1 kB-1 B (-0.0%)
    • runTransaction

      Size

      TypeBase (92e2279)Merge (92ccc2f)Diff
      size121 kB121 kB-1 B (-0.0%)
      size-with-ext-deps192 kB192 kB-1 B (-0.0%)
    • serverTimestamp

      Size

      TypeBase (92e2279)Merge (92ccc2f)Diff
      size17.9 kB17.9 kB-1 B (-0.0%)
      size-with-ext-deps87.5 kB87.5 kB-1 B (-0.0%)
    • setDoc

      Size

      TypeBase (92e2279)Merge (92ccc2f)Diff
      size120 kB120 kB-1 B (-0.0%)
      size-with-ext-deps191 kB191 kB-1 B (-0.0%)
    • setIndexConfiguration

      Size

      TypeBase (92e2279)Merge (92ccc2f)Diff
      size89.3 kB89.3 kB-1 B (-0.0%)
      size-with-ext-deps159 kB159 kB-1 B (-0.0%)
    • setLogLevel

      Size

      TypeBase (92e2279)Merge (92ccc2f)Diff
      size17.6 kB17.6 kB-1 B (-0.0%)
      size-with-ext-deps87.2 kB87.2 kB-1 B (-0.0%)
    • snapshotEqual

      Size

      TypeBase (92e2279)Merge (92ccc2f)Diff
      size39.5 kB39.5 kB-1 B (-0.0%)
      size-with-ext-deps109 kB109 kB-1 B (-0.0%)
    • startAfter

      Size

      TypeBase (92e2279)Merge (92ccc2f)Diff
      size36.4 kB36.4 kB-1 B (-0.0%)
      size-with-ext-deps106 kB106 kB-1 B (-0.0%)
    • startAt

      Size

      TypeBase (92e2279)Merge (92ccc2f)Diff
      size36.4 kB36.4 kB-1 B (-0.0%)
      size-with-ext-deps106 kB106 kB-1 B (-0.0%)
    • sum

      Size

      TypeBase (92e2279)Merge (92ccc2f)Diff
      size21.3 kB21.3 kB-1 B (-0.0%)
      size-with-ext-deps90.9 kB90.9 kB-1 B (-0.0%)
    • terminate

      Size

      TypeBase (92e2279)Merge (92ccc2f)Diff
      size17.7 kB17.7 kB-1 B (-0.0%)
      size-with-ext-deps87.5 kB87.5 kB-1 B (-0.0%)
    • updateDoc

      Size

      TypeBase (92e2279)Merge (92ccc2f)Diff
      size121 kB121 kB-1 B (-0.0%)
      size-with-ext-deps191 kB191 kB-1 B (-0.0%)
    • waitForPendingWrites

      Size

      TypeBase (92e2279)Merge (92ccc2f)Diff
      size101 kB101 kB-1 B (-0.0%)
      size-with-ext-deps171 kB171 kB-1 B (-0.0%)
    • where

      Size

      TypeBase (92e2279)Merge (92ccc2f)Diff
      size42.8 kB42.8 kB-1 B (-0.0%)
      size-with-ext-deps113 kB113 kB-1 B (-0.0%)
    • writeBatch

      Size

      TypeBase (92e2279)Merge (92ccc2f)Diff
      size123 kB123 kB-1 B (-0.0%)
      size-with-ext-deps193 kB193 kB-1 B (-0.0%)

Test Logs

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

Base automatically changed from dconeybe/LongPollingSettingsTests to master April 20, 2023 13:52
@dconeybe dconeybe changed the base branch from master to dconeybe/LongPollingLogicTweak April 20, 2023 14:01
Base automatically changed from dconeybe/LongPollingLogicTweak to master April 21, 2023 01:10
Copy link
Contributor
@rafikhan rafikhan left a comment

Choose a reason for hiding this comment

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

I suggested a documentation edit but otherwise LGTM

@@ -88,8 +88,11 @@ export interface FirestoreSettings extends LiteSettings {
* detect if long-polling should be used. This is very similar to
* `experimentalForceLongPolling`, but only uses long-polling if required.
*
* This setting will likely be enabled by default in future releases and
* cannot be combined with `experimentalForceLongPolling`.
* After having had a default value of `false` since its inception 4 years
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggestion: Just say "since 2019" and say "and changed in mid 2023" so you don't need to worry about it later?

Copy link
Contributor
@MarkDuckworth MarkDuckworth left a comment

Choose a reason for hiding this comment

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

LGTM

@dconeybe
Copy link
Contributor Author

@egilmorez Could you review for docs?

@dconeybe dconeybe requested review from a team and kevinthecheung as code owners May 5, 2023 05:39
@dconeybe dconeybe merged commit e45fea9 into master May 8, 2023
23 checks passed
@dconeybe dconeybe deleted the dconeybe/AutoDetectLongPollingEnabledByDefault branch May 8, 2023 18:36
@@ -306,13 +306,13 @@ describe('Settings', () => {
expect(db._getSettings().experimentalForceLongPolling).to.be.false;
});

it('long polling should be disabled if force=false', () => {
it('long polling should be in auto-detect mode if force=false', () => {
// Use a new instance of Firestore in order to configure settings.
const db = newTestFirestore();
db._setSettings({
experimentalForceLongPolling: false
Copy link
Contributor

Choose a reason for hiding this comment

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

by the looks of it, whether experimentalForceLongPolling is set to false or not does not change the settings below (as it looks the same from the test above).

However, setting experimentalForceLongPolling to false should actually disable auto detect long polling too, is that right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If both experimentalForceLongPolling=true and experimentalAutoDetectLongPolling=true then an exception will be thrown:

it('can not use mutually exclusive settings together', () => {
// Use a new instance of Firestore in order to configure settings.
const db = newTestFirestore();
expect(() =>
db._setSettings({
experimentalForceLongPolling: true,
experimentalAutoDetectLongPolling: true
})
).to.throw(
`experimentalForceLongPolling and experimentalAutoDetectLongPolling cannot be used together.`
);
});

Those two settings are mutually exclusive. As a result, only one of forceLongPolling and detectBufferingProxy will be true in WebChannelOptions

forceLongPolling: this.forceLongPolling,
detectBufferingProxy: this.autoDetectLongPolling

Does that address your concern?

@google-oss-bot google-oss-bot mentioned this pull request May 11, 2023
@firebase firebase locked and limited conversation to collaborators Jun 8, 2023
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

6 participants