-
-
Notifications
You must be signed in to change notification settings - Fork 651
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
Discard fetches when the active, logged-in account has changed #5009
Labels
Comments
gnprice
added
a-multi-org
a-data-sync
Zulip's event system, event queues, staleness/liveness
P1 high-priority
labels
Sep 18, 2021
This was referenced Sep 18, 2021
chrisbobbe
added a commit
to chrisbobbe/zulip-mobile
that referenced
this issue
Dec 8, 2021
…cceeds And add a suggestion for what to do with the equality check on the caller's queue ID and the in-state queue ID. Fixes: zulip#5022 Related: zulip#5009
chrisbobbe
added a commit
to chrisbobbe/zulip-mobile
that referenced
this issue
Mar 8, 2022
…cceeds And add a suggestion for what to do with the equality check on the caller's queue ID and the in-state queue ID. Fixes: zulip#5022 Related: zulip#5009
We got a report today of what is probably this issue: |
Any objection to changing the title from
to
, since we probably want to cancel fetches when you log out the active account too? |
gnprice
changed the title
Discard fetches when the active account has changed
Discard fetches when the active, logged-in account has changed
Dec 14, 2022
5 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
When we go and fetch some data from the server, we should be sure to associate the resulting data with the right account, and not with some other of the user's accounts. In particular this should be the case even if the fetch took a while, and if in the interim the user went and switched to look at a different account (the new "active account".)
We'll need to solve this as part of #5005, where we'll potentially have several fetches going concurrently for several different accounts, and each will need to know which account the results should get stored under.
But pending that, in our current world where we have server data for just the one active account at a time, it'd be enough to discard the fetch's result (and ideally cancel the fetch itself, #4170) if the active account has changed by then.
Currently we do this in the event-queue long-polling loop in
startEventPolling
, which is the most important case, but not most other places -- notably, not indoInitialFetch
registerAndStartPolling
, or the various message-fetching actions infetchActions.js
.Issues #4170 and #4659 cover parts of how we might do this.
Issue #3791 is basically an example symptom of this.
The text was updated successfully, but these errors were encountered: