-
Notifications
You must be signed in to change notification settings - Fork 944
Firestore: Enable auto-detection of long-polling networking mode #7236
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
dconeybe
merged 25 commits into
master
from
dconeybe/AutoDetectLongPollingEnabledByDefault
May 8, 2023
Merged
Changes from 24 commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
f062376
set experimentalAutoDetectLongPolling default value to true
dconeybe 65d5e9c
changeset
dconeybe 959c0e7
Firestore: database.test.ts: add unit tests for long polling settings…
dconeybe 7f52fe4
Merge branch 'LongPollingSettingsTests' into AutoDetectLongPollingEna…
dconeybe ac752d1
Update documentation of experimentalAutoDetectLongPolling to document…
dconeybe 8218910
reword changeset
dconeybe 09d6f31
yarn docgen devsite
dconeybe 40f2018
Merge remote-tracking branch 'origin/master' into AutoDetectLongPolli…
dconeybe eb854dc
Firestore: settings.ts: very minor refactor of long-polling logic.
dconeybe 75b2c9b
Merge branch 'LongPollingLogicTweak' into AutoDetectLongPollingEnable…
dconeybe ef8665f
invert negative 'if' statement and ensure that experimentalAutoDetect…
dconeybe e0e0741
Merge branch 'LongPollingLogicTweak' into AutoDetectLongPollingEnable…
dconeybe 8e84d43
add DEFAULT_AUTO_DETECT_LONG_POLLING and coerce to boolean
dconeybe 3e2be99
Firestore: database.test.ts: add tests for coercing experimentalForce…
dconeybe d8fccbe
yarn prettier
dconeybe 7427858
tweak unit test descriptions
dconeybe 81a61b4
add `// eslint-disable-next-line @typescript-eslint/no-explicit-any` …
dconeybe 10aba36
Merge branch 'LongPollingCoerceToBooleanTests' into LongPollingLogicT…
dconeybe 17519c3
invert a negative 'if' statement
dconeybe 7522b43
Merge remote-tracking branch 'remotes/origin/dconeybe/LongPollingLogi…
dconeybe c27a49a
Merge remote-tracking branch 'origin/master' into LongPollingLogicTweak
dconeybe a9696c5
Merge branch 'LongPollingLogicTweak' into AutoDetectLongPollingEnable…
dconeybe b64dc66
Merge remote-tracking branch 'origin/master' into AutoDetectLongPolli…
dconeybe f166d1d
tweak api docs for experimentalAutoDetectLongPolling, as suggested in…
dconeybe e58f70b
Merge remote-tracking branch 'origin/master' into AutoDetectLongPolli…
dconeybe File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
'@firebase/firestore': minor | ||
'firebase': minor | ||
--- | ||
|
||
Enabled long-polling networking mode auto detection by default. It can be explicitly disabled by setting `FirestoreSettings.experimentalForceLongPolling` to `false`. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If both
experimentalForceLongPolling=true
andexperimentalAutoDetectLongPolling=true
then an exception will be thrown:firebase-js-sdk/packages/firestore/test/unit/api/database.test.ts
Lines 269 to 280 in e147219
Those two settings are mutually exclusive. As a result, only one of
forceLongPolling
anddetectBufferingProxy
will betrue
inWebChannelOptions
firebase-js-sdk/packages/firestore/src/platform/browser/webchannel_connection.ts
Lines 202 to 203 in e147219
Does that address your concern?