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

Update "Entire source account" deletion to complete when server reports success #1344

Closed
eloquence opened this issue Nov 23, 2021 · 8 comments · Fixed by #1386 or #1458
Closed

Update "Entire source account" deletion to complete when server reports success #1344

eloquence opened this issue Nov 23, 2021 · 8 comments · Fixed by #1386 or #1458
Labels
enhancement New feature or request

Comments

@eloquence
Copy link
Member

#1311 updates "Files and messages" deletion to complete when the server reports success, instead of waiting for the next sync. This dramatically improves deletion performance, especially on a server with many sources where a sync takes a long time. We should apply the same performance improvement to "Entire source account" deletion.

@eloquence eloquence added the enhancement New feature or request label Nov 23, 2021
@eloquence
Copy link
Member Author

(Proposing this as a post-0.5.0 enhancement assuming we discover no novel issues with this approach.)

@eloquence
Copy link
Member Author

Reopened via revert in #1426. To fully resolve, we'll want to make sure we don't observe the behavior noted in #1420.

@eloquence eloquence reopened this Feb 14, 2022
@sssoleileraaa
Copy link
Contributor

#1420 is not specific to account deletion, rather it has to do with how we switch between online and offline modes in the client. So those issues should be resolved separately, I believe.

@sssoleileraaa
Copy link
Contributor

Also, #1420 is higher priority than speeding up source deletion right now.

@eloquence
Copy link
Member Author

I do think the two issues should ideally be resolved together. Deletion is already a major pain point for our users, and we don't want to push out a release that makes things slower. And slowness is also a security issue: if you are in an emergency situation, having to wait for an entire sync duration to delete sources could prevent you from deleting things you need to delete, and you may be just as likely to close the laptop while the on-disk deletion is not complete.

@sssoleileraaa
Copy link
Contributor

Good point, let's prioritize adding this into the next release as well, but it is technically a separate issue. Right now, I'm seeing three issues that we'll need to work on: this one, #1420, and #1429. Is that your understanding?

@eloquence
Copy link
Member Author

Yes, that makes sense - #1429 could be resolved by ensuring that files and database updates are performed the moment the server notifies us the deletion is successful (instead of waiting for a sync).

@sssoleileraaa
Copy link
Contributor

Yes, that is a potential solution that we need to explore more, and going back to slow deletion is not ideal. Since syncs can take a long time, because of the way we have to retrieve all data from the server to find out what we need to delete or add (this won't be true once we implement API v2 as suggested here freedomofpress/securedrop#5104), forcing an immediate sync is not ideal. It's just the old, simple way of doing things. Since the sync happens on a separate thread, we can hit a situation where the deletion will have to wait until an ongoing sync is finished, but this would be faster than forcing an end sync after deletion. I'll write up some notes in a doc and share here later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment