Local deletes are not propagated after 'Storage unavailable' is resolved
I had a hunch that there may be issues with temporarily ignoring directories, like we do when the server replies 503 Storage not available and did some tests with the 1.8 branch.
Local and remote edits and new files worked fine. Local deletes failed to propagate, however. To reproduce:
- Upload test/foo.txt to the server, have it replicate to the client.
- Mark test/ as 503 Storage not available.
- Delete test/foo.txt locally.
- Restore test/ to normal operation.
- The next sync will download foo.txt from the server.
The expected outcome would have been for foo.txt to be deleted from the server.
This happens because SyncJournalDB::postSyncCleanup() removes the test/foo.txt entry from the database after a sync where test/ was ignored due to 503.
We would have to make sure to check the ETag before we remove the file on the server. It might have happened that the file changed on the server while client saw the 503. In that case, the re-download would be fine.
@dragotin I don't understand? If we delete the entry from the DB we don't have an etag to compare to! And if we didn't delete the DB entry, our usual sync logic would do the right thing once the 503 is resolved.
The metadata table entries for remote 503 dirs are now kept. That solves the problem in my tests.
Should this resolve the client portion of what was reported in https://github.com/owncloud/core/issues/15189 where we had to manually clean out the client blacklist after 503 errors?
I can't teste the issue because We have found another Issue reported in owncloud/core#16457: SFTP external storage doesn't allow to upload files
@razyr No, that issue was about 507 errors, this is different.
@Dianafg76 Why did you remove ReadyToTest? It's ready, after all? Ok to close this?
@ckamm I closed the issue, as it is working well. I remove ReadyToTest, because I confused, sorry