Skip to content

Offline get() improvements. #1133

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 1 commit into from
Aug 17, 2018
Merged

Offline get() improvements. #1133

merged 1 commit into from
Aug 17, 2018

Conversation

mikelehen
Copy link
Contributor

  1. Changed MAX_WATCH_STREAM_FAILURES to 1 per conversation with @wilhuff and
    @jdimond.
  2. Fixed a "race" where when a get() triggered a watch stream error, we'd
    restart the stream, then get() would remove its listener, and so we had no
    listener left once the watch stream was "opened". Without a listen to send
    we'd be stuck in Offline state (even though we should be Unknown whenever
    we have no listens to send), resulting in the next get() returning data
    from cache without even attempting to reach the backend.

1. Changed MAX_WATCH_STREAM_FAILURES to 1 per conversation with @wilhuff and
   @jdimond.
2. Fixed a "race" where when a get() triggered a watch stream error, we'd
   restart the stream, then get() would remove its listener, and so we had no
   listener left once the watch stream was "opened". Without a listen to send
   we'd be stuck in Offline state (even though we should be Unknown whenever
   we have no listens to send), resulting in the next get() returning data
   from cache without even attempting to reach the backend.
Copy link
Contributor

@wilhuff wilhuff left a comment

Choose a reason for hiding this comment

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

LGTM

@wilhuff wilhuff assigned mikelehen and unassigned wilhuff Aug 17, 2018
@mikelehen mikelehen merged commit 14f9a71 into master Aug 17, 2018
@mikelehen mikelehen deleted the mikelehen/only-one-retry branch August 17, 2018 18:44
mikelehen pushed a commit to firebase/firebase-ios-sdk that referenced this pull request Aug 18, 2018
[Port of firebase/firebase-js-sdk#1133]

1. Changed MAX_WATCH_STREAM_FAILURES to 1 per conversation with @wilhuff and
   @jdimond.
2. Fixed a "race" where when a get() triggered a watch stream error, we'd
   restart the stream, then get() would remove its listener, and so we had no
   listener left once the watch stream was "opened". Without a listen to send
   we'd be stuck in Offline state (even though we should be Unknown whenever
   we have no listens to send), resulting in the next get() returning data
   from cache without even attempting to reach the backend.
mikelehen pushed a commit to firebase/firebase-ios-sdk that referenced this pull request Aug 18, 2018
[Port of firebase/firebase-js-sdk#1133]

1. Changed MAX_WATCH_STREAM_FAILURES to 1 per conversation with @wilhuff and
   @jdimond.
2. Fixed a "race" where when a get() triggered a watch stream error, we'd
   restart the stream, then get() would remove its listener, and so we had no
   listener left once the watch stream was "opened". Without a listen to send
   we'd be stuck in Offline state (even though we should be Unknown whenever
   we have no listens to send), resulting in the next get() returning data
   from cache without even attempting to reach the backend.
mikelehen pushed a commit that referenced this pull request Aug 18, 2018
wilhuff pushed a commit that referenced this pull request Aug 18, 2018
* Revert "Disable some spec tests on mobile (#1134)"

This reverts commit a56134b.

* Revert "Offline get() improvements. (#1133)"

This reverts commit 14f9a71.
mikelehen pushed a commit to firebase/firebase-android-sdk that referenced this pull request Sep 6, 2018
[Port of firebase/firebase-js-sdk#1133]

1. Changed MAX_WATCH_STREAM_FAILURES to 1 per conversation with @wilhuff and
   @jdimond.
2. Fixed a "race" where when a get() triggered a watch stream error, we'd
   restart the stream, then get() would remove its listener, and so we had no
   listener left once the watch stream was "opened". Without a listen to send
   we'd be stuck in Offline state (even though we should be Unknown whenever
   we have no listens to send), resulting in the next get() returning data
   from cache without even attempting to reach the backend.
mikelehen added a commit to firebase/firebase-android-sdk that referenced this pull request Sep 6, 2018
[Port of firebase/firebase-js-sdk#1133]

1. Changed MAX_WATCH_STREAM_FAILURES to 1 per conversation with @wilhuff and
   @jdimond.
2. Fixed a "race" where when a get() triggered a watch stream error, we'd
   restart the stream, then get() would remove its listener, and so we had no
   listener left once the watch stream was "opened". Without a listen to send
   we'd be stuck in Offline state (even though we should be Unknown whenever
   we have no listens to send), resulting in the next get() returning data
   from cache without even attempting to reach the backend.
@firebase firebase locked and limited conversation to collaborators Oct 17, 2019
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