-
Notifications
You must be signed in to change notification settings - Fork 42
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
Replies are sometimes displayed out of order #653
Comments
Problem 1: Replies are prioritized low in the queue Fixes:
Problem 2: conversation slow to update Fix:
|
Agreed, but I'm not sure that this is the entire cause of the reply slowness I'm seeing -- I was able to reliably reproduce this over the course of a couple of minutes, where it would alternate between fast (2.5 seconds) and slow (15-20 seconds), without me initiating any sync of my own during this time. |
Performance is significantly better in the latest nightly build, I'm now seeing >1st replies transition all the way to "sent" in the 6-8 second range. Perhaps this will go down further once all the metadata sync changes have landed. We still have the ordering problem; the order is only "eventually correct", but initially replies appear out of order. Also worth noting: Out of 20 replies or so I encountered one random failure. I would have expected it to go to "Failed to send" after lots more retries, but it basically transitioned to "Failed" almost immediately. |
Is this not fixed by #688..? |
yep you're right, I have not observed this behavior for some time. Closing and let's reopen if we see this again. |
I just updated the description with the latest STR and reopening because this is not resolved yet. |
Aha..! 😄 |
I've not tested your STR yet Allie, but yay, generally speaking, replies are a lot more reliable now (in Qubes). I'm not seeing the ordering issue during normal use, and replies are sent quite quickly. |
When someone gets a chance, could you run through the updated STR to confirm that this is a bug we need to fix: #653 (comment) -- I'm not a 100% sure that @ntoll has already done so |
Note: these replies stay out of order even after a pending reply turns to a successful reply. when i close the client and reopen the replies are reordered correctly: It appears the bug is somewhere within update_conversation |
So... @creviera yes I did manage to recreate but functional tests have taken up my time. However, now they're done I'll look into this. I've just observed the following (problem) behaviour by following the STR:
I agree with @creviera that the error is in 'update_conversation' and that it's not so much a bug, as an omission to deal with how to order pending or failed replies (which won't yet be known by the server, so the message order when we next refresh will be correct but won't contain those unknown replies). My suggested fix (which I'll go ahead and implement so we can at least confirm my hunch is correct -- we can change the fix's behaviour during review of the impending PR) is:
Sound like a plan..? Give me 10 mins to get a PR in fight with a potential fix / unit tests to prove things behave as expected. |
OK having trouble reproducing this due to #820 but looking at the logic: we have logic to reorder drafts to ensure consistent ordering of interleaved successful replies and drafts. This is performed at sync time, and at reply send time when the reply a successful. That means that the local order we have stored should be correct. In order for this order to be shown in the UI, we need to enter moved the below to issue #821 to focus convo on the reordering bug (my bad)Question: do we really need |
add_reply_from_reply_box is called when the user clicks "Send". Without it, we won't immediately see replies in the ConversationView. If we want to remove it, I think we will need to emit a new signal from the Controller after it creates the new DraftReply in response to the user clicking "Send" and then the GUI will have to respond by adding a new reply widget to the conversation view. I think this is more of a refactor, but I'm not sure it's related to this issue, because securedrop-client/securedrop_client/gui/widgets.py Lines 2758 to 2768 in b75db2d
The strange reordering behavior only seems to be introduced once a reply is failed, which is why I no longer see STR #1 reported in this issue after making this change: #818 |
In order to verify if this was a UI only issue or not I decided to double check using the debug logging here along with logging the current value of
|
I saw this once as well during recent QA but didn't write it up, thanks for noting it here. I'd say let's definitely reopen, defer to Allie on priority, but I think it'd be good to know at least what's causing it. |
STR 1 - For
SendReplyJobTimeoutError
STR 2 - For
SendReplyJobError
repeat steps 2-4 above
The text was updated successfully, but these errors were encountered: