-
Notifications
You must be signed in to change notification settings - Fork 39
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.file_counter unique constraint fails and crashes app #489
Comments
the stack trace is on qubes, so once i find a transfer device i will copy it over and paste it in this ticket, but for now, i see that this is happening during |
This could be arising due to the following race:
I think this can still occur in the priority queue case (though is a bit hard to reproduce because the reply needs to be saved server-side), because metadata syncs will be prioritized higher than the sending of replies. |
Here's a proposed resolution that is relevant also for fixing this other bug:
At each one of these stages, we should be updating the GUI logic to update based on the state of the database (much cleaner all around and also incidentally fixes #294). So the proposed actions are:
|
Reflecting on this, #461 will address the sync racing the queue actions. That said, we should also keep in mind that there's also the possibility that the source sends a message M at almost the same time as the reply gets saved, i.e. before the download job to fetch M is even added to the queue. This won't produce an exception like seen in this bug, but it does mean that the ordering of the source's conversation will not be unique. This means that we need to be sure to update |
Description
Client crashes after sending replies that timeout and then pressing refresh wehn back online.
STR
UNIQUE constraint failed: replies.source_id, replies.file_counter
The text was updated successfully, but these errors were encountered: