-
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
Speed up source deletion #1386
Speed up source deletion #1386
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, but I'm not confident I understand the sync-ing behavior well enough to give a full green tick. : )
I was going to add the same timestamp logic as used for conversation deletion, but i don't think we need it. Calling on @eloquence to try to break i! If it's good as is, I'll remove the timestamp from the new deletion signal. If the "ghost" issue happens, I'll add logic using the timestamp. |
@gonzalo-bulnes feel free to try to break this too plz X). I didn't see your review until after I posted that, but always appreciate the way erik finds user-facing issues in my code! |
1b0c392
to
93ca170
Compare
💡 So this means using a single-shot timer trigger is a known-good solution, am I correct? |
I've taken this for a spin today and overall it looks great! Deletion is indeed much faster, and I'm not able to reproduce #1343 any longer. I do see an issue with sources sometimes re-appearing until the next sync (similar to #858). These "ghost sources" can be interacted with, but if you attempt to reply to them, you get a "Failed to send" because they've already been deleted on the sever. The error is logged as "bad request" on the client. The way I'm able to reproduce it:
What happens is that sometimes a source like |
Yup, confirmed. I think I know how to fix... I'll keep the fix in a separate commit |
Taking this for another quick spin now. |
Functionally all looks great to me:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works great! The removal is snappy and complete. Tested several times against an onion service, and it was pleasant responsive. Also tested a pathological edge where the server doesn't reply with a 200, and the client appropriately raised the error and the source was not removed from the UI prematurely:
If the server did actually delete the source in question, despite responding not-ok, then the subsequent sync dropped the source from the UI, which is a nice response. When I edited the server code to respond not-ok and preserve the source in the server db, subsequent client syncs did not remove the source from the UI—also good!
I tacked on one small cleanup commit. LGTM.
This reverts commit 40a224d.
Signed-off-by: Allie Crevier <[email protected]>
3913be6
to
f8010cc
Compare
Ah, was already handled in d9e5546 ; just needed a rebase here. |
Description
Fixes #1344
Fixes #1343
Test Plan
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:
If these changes add or remove files other than client code, the AppArmor profile may need to be updated. Please check as applicable:
If these changes modify the database schema, you should include a database migration. Please check as applicable:
main
and confirmed that the migration applies cleanlymain
and would like the reviewer to do so