Skip to content

Fix S3 error handling - #22514

Merged
rullzer merged 2 commits into
masterfrom
fix/s3/only_delete_new_failed
Aug 31, 2020
Merged

Fix S3 error handling#22514
rullzer merged 2 commits into
masterfrom
fix/s3/only_delete_new_failed

Conversation

@rullzer

Copy link
Copy Markdown
Member

No description provided.

If the object store errors we should not always delete the filecache
entry. As this might lead to people losing access to their files.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
If we already update before we have no way to revert if the upload
fails.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
@rullzerrullzer added bug 3. to review Waiting for reviews labels Aug 31, 2020
@rullzerrullzer added this to the Nextcloud 20 milestone Aug 31, 2020

@juliusknorrjuliusknorr left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems to do the trick when manually triggering an exception 👍


if (!$exists) {
if ($exists) {
$this->getCache()->update($fileId, $stat);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what stats are being updated here? the size is already updated in the CountWrapper callback

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mtime etc

@rullzer
rullzer merged commit 8dd2499 into masterAug 31, 2020
@rullzer
rullzer deleted the fix/s3/only_delete_new_failed branch August 31, 2020 17:03
@rullzer

Copy link
Copy Markdown
MemberAuthor

/backport to stable19

@rullzer

Copy link
Copy Markdown
MemberAuthor

/backport to stable18

@rullzer

Copy link
Copy Markdown
MemberAuthor

/backport to stable17

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

Labels

3. to reviewWaiting for reviewsbug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@rullzer@icewind1991@juliusknorr