-
Notifications
You must be signed in to change notification settings - Fork 309
model: Message objects can be shared by message-list models, resulting in duplicated work on them #455
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
Labels
Milestone
Comments
This was referenced May 8, 2024
chrisbobbe
added a commit
to gnprice/zulip-flutter
that referenced
this issue
May 31, 2024
…ists This looks potentially NFC, but in fact it fixes part of 455: it fixes the issue as far as reactions are concerned. The change is NFC only if the message appears in just one message list. In addition to the symptom explained at zulip#455, this fixes another, which exists now that we've added the central message store with `reconcileMessages`. It's arguably a bit of an inverse of zulip#455, but fundamentally the same issue: if there are currently *zero* message lists that contain the message, then we would drop the update. Then on later fetching the same message, we'd use the version we had (for the good reason explained in reconcileMessages) but in fact it'd be stale. This zero-message-lists symptom also reproduces with other kinds of updates that we handle: editing a message, and adding/removing flags. So, in the regression test for this symptom, I've tried to make some reusable test code that we can use when we fix those other ways of updating messages. Co-authored-by: Chris Bobbe <[email protected]> Fixes-partly: zulip#455
chrisbobbe
added a commit
to gnprice/zulip-flutter
that referenced
this issue
May 31, 2024
Like a recent commit did for reactions, this fixes the part of 455 that's concerned with message edits. With message edits, unlike reactions, the double-processing issue when there are two or more message lists wasn't user-facing, since the mutation done by message lists was (naturally) idempotent. So there isn't really an easy or helpful regression test to write for that. But we can and do write one against the dropped-update symptom when there are zero message lists open. For an explanation of that symptom, see the recent commit where we dealt with reactions. Co-authored-by: Chris Bobbe <[email protected]> Fixes-partly: zulip#455
chrisbobbe
added a commit
to gnprice/zulip-flutter
that referenced
this issue
Jun 4, 2024
In itself, this exacerbates zulip#455 by making it trigger in more circumstances. That's OK for the moment, because this also gives us a foundation on which to fix that issue soon. A key part of testing this is the line added in message_list_test's `checkInvariants`, which checks that all messages tracked by the MessageListView are present in the central message store. Co-authored-by: Chris Bobbe <[email protected]>
chrisbobbe
added a commit
to gnprice/zulip-flutter
that referenced
this issue
Jun 4, 2024
…ists This looks potentially NFC, but in fact it fixes part of 455: it fixes the issue as far as reactions are concerned. The change is NFC only if the message appears in just one message list. In addition to the symptom explained at zulip#455, this fixes another, which exists now that we've added the central message store with `reconcileMessages`. It's arguably a bit of an inverse of zulip#455, but fundamentally the same issue: if there are currently *zero* message lists that contain the message, then we would drop the update. Then on later fetching the same message, we'd use the version we had (for the good reason explained in reconcileMessages) but in fact it'd be stale. This zero-message-lists symptom also reproduces with other kinds of updates that we handle: editing a message, and adding/removing flags. So, in the regression test for this symptom, I've tried to make some reusable test code that we can use when we fix those other ways of updating messages. Co-authored-by: Chris Bobbe <[email protected]> Fixes-partly: zulip#455
chrisbobbe
added a commit
to gnprice/zulip-flutter
that referenced
this issue
Jun 4, 2024
Like a recent commit did for reactions, this fixes the part of 455 that's concerned with message edits. With message edits, unlike reactions, the double-processing issue when there are two or more message lists wasn't user-facing, since the mutation done by message lists was (naturally) idempotent. So there isn't really an easy or helpful regression test to write for that. But we can and do write one against the dropped-update symptom when there are zero message lists open. For an explanation of that symptom, see the recent commit where we dealt with reactions. Co-authored-by: Chris Bobbe <[email protected]> Fixes-partly: zulip#455
chrisbobbe
added a commit
to gnprice/zulip-flutter
that referenced
this issue
Jun 5, 2024
In itself, this exacerbates zulip#455 by making it trigger in more circumstances. That's OK for the moment, because this also gives us a foundation on which to fix that issue soon. A key part of testing this is the line added in message_list_test's `checkInvariants`, which checks that all messages tracked by the MessageListView are present in the central message store. Co-authored-by: Chris Bobbe <[email protected]>
chrisbobbe
added a commit
to gnprice/zulip-flutter
that referenced
this issue
Jun 5, 2024
…ists This looks potentially NFC, but in fact it fixes part of zulip#455: it fixes the issue as far as reactions are concerned. The change is NFC only if the message appears in just one message list. In addition to the symptom explained at zulip#455, this fixes another, which exists now that we've added the central message store with `reconcileMessages`. It's arguably a bit of an inverse of zulip#455, but fundamentally the same issue: if there are currently *zero* message lists that contain the message, then we would drop the update. Then on later fetching the same message, we'd use the version we had (for the good reason explained in reconcileMessages) but in fact it'd be stale. This zero-message-lists symptom also reproduces with other kinds of updates that we handle: editing a message, and adding/removing flags. So, in the regression test for this symptom, I've tried to make some reusable test code that we can use when we fix those other ways of updating messages. Co-authored-by: Chris Bobbe <[email protected]> Fixes-partly: zulip#455
chrisbobbe
added a commit
to gnprice/zulip-flutter
that referenced
this issue
Jun 5, 2024
Like a recent commit did for reactions, this fixes the part of zulip#455 that's concerned with message edits. With message edits, unlike reactions, the double-processing issue when there are two or more message lists wasn't user-facing, since the mutation done by message lists was (naturally) idempotent. So there isn't really an easy or helpful regression test to write for that. But we can and do write one against the dropped-update symptom when there are zero message lists open. For an explanation of that symptom, see the recent commit where we dealt with reactions. Co-authored-by: Chris Bobbe <[email protected]> Fixes-partly: zulip#455
chrisbobbe
added a commit
to gnprice/zulip-flutter
that referenced
this issue
Jun 5, 2024
Like a recent commit did for message edits, and one before that did for reactions, this fixes the part of zulip#455 that's concerned with update-message-flags events. Like in the commit that dealt with message edits, this fixes the symptom of a dropped update when there are zero message lists open. In this case I'm *pretty* sure there wasn't a user-facing symptom with the double-processing situation when the message is in two or more open message lists. That's because I believe we don't give different behavior for a flag that's present multiple times in the `flags` list, vs. just once.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Quoting from #410 (comment) :
Greg replied there:
The text was updated successfully, but these errors were encountered: