client icon indicating copy to clipboard operation
client copied to clipboard

Local deletes are not propagated after 'Storage unavailable' is resolved

Open ckamm opened this issue 11 years ago • 9 comments

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.

ckamm avatar Feb 26 '15 13:02 ckamm

This happens because SyncJournalDB::postSyncCleanup() removes the test/foo.txt entry from the database after a sync where test/ was ignored due to 503.

ckamm avatar Feb 27 '15 08:02 ckamm

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 avatar Mar 18 '15 14:03 dragotin

@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.

ckamm avatar Mar 25 '15 09:03 ckamm

The metadata table entries for remote 503 dirs are now kept. That solves the problem in my tests.

ckamm avatar Apr 08 '15 08:04 ckamm

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?

razyr avatar May 09 '15 11:05 razyr

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

Dianafg76 avatar May 20 '15 07:05 Dianafg76

@razyr No, that issue was about 507 errors, this is different.

ckamm avatar May 20 '15 09:05 ckamm

@Dianafg76 Why did you remove ReadyToTest? It's ready, after all? Ok to close this?

ckamm avatar Jun 03 '15 07:06 ckamm

@ckamm I closed the issue, as it is working well. I remove ReadyToTest, because I confused, sorry

Dianafg76 avatar Jun 03 '15 07:06 Dianafg76