Skip to content

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 (