Skip to content
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

app: fix reply ordering #829

Merged
merged 2 commits into from
Feb 27, 2020
Merged

app: fix reply ordering #829

merged 2 commits into from
Feb 27, 2020

Conversation

redshiftzero
Copy link
Contributor

@redshiftzero redshiftzero commented Feb 27, 2020

Description

Fixes #653.

supersedes #818

Test Plan

follow STR in 653

Checklist

If these changes modify code paths involving cryptography, the opening of files in VMs or network (via the RPC service) traffic, Qubes testing in the staging environment is required. For fine tuning of the graphical user interface, testing in any environment in Qubes is required. Please check as applicable:

  • I have tested these changes in the appropriate Qubes environment
  • I do not have an appropriate Qubes OS workstation set up (the reviewer will need to test these changes)
  • These changes should not need testing in Qubes

If these changes add or remove files other than client code, packaging logic (e.g., the AppArmor profile) may need to be updated. Please check as applicable:

  • I have submitted a separate PR to the packaging repo
  • No update to the packaging logic (e.g., AppArmor profile) is required for these changes
  • I don't know and would appreciate guidance

@sssoleileraaa
Copy link
Contributor

nice! this fixes the issue

@redshiftzero redshiftzero changed the title [wip] app: update source.interaction_count after successful reply app: fix reply ordering Feb 27, 2020
@redshiftzero redshiftzero marked this pull request as ready for review February 27, 2020 18:16
sssoleileraaa
sssoleileraaa previously approved these changes Feb 27, 2020
Copy link
Contributor

@sssoleileraaa sssoleileraaa left a comment

Choose a reason for hiding this comment

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

lgtm and works as described...

I'm just trying to understand what the problem was with the reordering issue and why it only came up when a reply failed. This is what seemed to be happening before your change:

https://user-images.githubusercontent.com/4522213/75492917-9f787380-596d-11ea-9ad8-1b54fadb1d74.gif

in the video you can see i start of with 4 replies that go from pending to successful and then the 5th reply fails:

"1" successful reply   widget_index=1 file_counter=1
"2" successful reply   widget_index=2 file_counter=2
"3" successful reply   widget_index=3 file_counter=3
"4" successful reply   widget_index=4 file_counter=4
"5" failed reply       widget_index=5 file_counter=4 timestamp 1

then i sent another reply "6" after the failed reply "5":

"1" successful reply   widget_index=1 file_counter=1
"2" successful reply   widget_index=2 file_counter=2
"3" successful reply   widget_index=3 file_counter=3
"4" successful reply   widget_index=4 file_counter=4
"5" failed reply       widget_index=5 file_counter=4 timestamp 1
"6" pending reply      widget_index=6 file_counter=4 timestamp 2

then the failed reply "5" succeeds:

"1" successful reply   widget_index=1 file_counter=1
"2" successful reply   widget_index=2 file_counter=2
"3" successful reply   widget_index=3 file_counter=3
"4" successful reply   widget_index=4 file_counter=4
"5" successful reply   widget_index=5 file_counter=4
"6" pending reply      widget_index=6 file_counter=4 timestamp 2

then the pending reply "6" fails:

"1" successful reply   widget_index=1 file_counter=1
"2" successful reply   widget_index=2 file_counter=2
"3" successful reply   widget_index=3 file_counter=3
"6" failed reply       widget_index=4 file_counter=4 timestamp 2
"4" successful reply   widget_index=5 file_counter=4
"5" successful reply   widget_index=6 file_counter=4

then i restart the client and everything is in order:

"1" successful reply   widget_index=1 file_counter=1
"2" successful reply   widget_index=2 file_counter=2
"3" successful reply   widget_index=3 file_counter=3
"4" successful reply   widget_index=4 file_counter=4
"5" successful reply   widget_index=5 file_counter=5
"6" successful reply   widget_index=6 file_counter=6

# If we do not update the interaction_count after each successful reply send,
# future drafts will have an interaction_count that is too low, leading
# to incorrectly ordered drafts until a metadata sync completes (the metadata
# sync is the place where the source object is updated from the server).
Copy link
Contributor

Choose a reason for hiding this comment

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

helpful comment ❤️

@sssoleileraaa sssoleileraaa dismissed their stale review February 27, 2020 23:15

i think we should chat about followup issues regarding speech bubbles being drawn on top of each other and rare but sometimes missing replies

@sssoleileraaa
Copy link
Contributor

I think this should probably be a follow-up issue, but i'm still sometimes seeing multiple replies being drawn on top of each other after a failed reply. Also, I saw a reply go missing until i restarted the client. These are issues that don't seem to happen regularly, and since this PR fixes the reproducible error I think we could go ahead with a merge and track the other issues separately.

@redshiftzero what do you think?

@redshiftzero
Copy link
Contributor Author

OK I'm on board with that, I don't see how this could cause bubbles to appear on top of each other so I think if you're seeing overlain message bubbles then there's another issue on master. Regarding your example above, it's possible the reply is showing as failed incorrectly, since you close the client and restart and then it shows as succeeded (the behavior in #820 might be a cause, honestly not sure yet). Let's:

  1. Merge this
  2. See if we can repro the message bubble reappearing and fix (we can do this too during QA)
  3. Comb through and try to shake out any other reply ordering issues the rest of this week and during QA

@sssoleileraaa sssoleileraaa merged commit 9cf287f into master Feb 27, 2020
@sssoleileraaa sssoleileraaa deleted the fix-reply-ordering branch February 27, 2020 23:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Replies are sometimes displayed out of order
2 participants