freedomofpress / securedrop-client

a Qt-based GUI for SecureDrop journalists 📰🗞️
GNU Affero General Public License v3.0
40 stars 39 forks source link

Client never gives up on files the Server cannot serve #2112

Open cfm opened 1 month ago

cfm commented 1 month ago

Description

When the Server has a submission or reply on record that it cannot serve (e.g., because it has been deleted from disk), the Client will keep trying to download it forever.

Steps to Reproduce

  1. Register as a source and submit something.
  2. Delete that source's directory from /var/lib/securedrop/store.
  3. Log into the Client.

Expected Behavior

Sync eventually completes, modulo Tor weather.

Actual Behavior

Since the deleted source's disconnected submission can never be downloaded, sync never completes.

Comments

There's an obvious tension here between "fail when the Server cannot serve" and "keep trying when Tor weather is bad".

We should start by redesigning the overall Client—Server synchronization model. Consider this one problem that redesign will need to solve.

cfm commented 1 month ago

(In fairness to the Client, the challenge here is for it to reach some form of consistency with, or at least a consistent representation of, a datastore that is inconsistent with itself....)