Skip to content

Offline get() improvements. #2

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
Sep 6, 2018
Merged

Conversation

mikelehen
Copy link
Contributor

@wilhuff You have already reviewed this. I just moved it to this repo via "git diff" and "patch". Sorry for the extra churn.

[Port of https://github.com/firebase/firebase-js-sdk/pull/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.

[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.
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 (again)

@mikelehen
Copy link
Contributor Author

/test connected-check

@mikelehen mikelehen merged commit a47788a into master Sep 6, 2018
@mikelehen mikelehen deleted the mikelehen/only-retry-once branch September 6, 2018 21:16
diwu-arete added a commit that referenced this pull request Jun 12, 2019
diwu-arete added a commit that referenced this pull request Jun 13, 2019
…oid SDK (#514)

* Add Firebase Segmentation SDK and some skeleton code in Firebase Android SDK

* Add Firebase Segmentation SDK and some skeleton code in Firebase Android SDK

* Address comments #1

* Address comments #1

* Address comments #2
ghost pushed a commit that referenced this pull request Aug 7, 2019
ghost pushed a commit that referenced this pull request Aug 8, 2019
* awaitPendingWrites initial revision

* Add test to check task failure upon user change.

* address comments #1

* addressing comments #2

* addressing comments #3

* addressing comments #4: better public comment.

* fixing more nits
@firebase firebase locked and limited conversation to collaborators Oct 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants