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

Fix S3 error handling #22514

Merged
merged 2 commits into from
Aug 31, 2020
Merged

Fix S3 error handling #22514

merged 2 commits into from
Aug 31, 2020

Conversation

rullzer
Copy link
Member

@rullzer rullzer commented Aug 31, 2020

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>
@rullzer rullzer added bug 3. to review Waiting for reviews labels Aug 31, 2020
@rullzer rullzer added this to the Nextcloud 20 milestone Aug 31, 2020
Copy link
Member

@juliushaertl juliushaertl left a comment

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 👍

throw $ex; // make this bubble up
}

if (!$exists) {
if ($exists) {
$this->getCache()->update($fileId, $stat);
Copy link
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
Member Author

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 master Aug 31, 2020
@rullzer rullzer deleted the fix/s3/only_delete_new_failed branch August 31, 2020 17:03
@rullzer
Copy link
Member Author

rullzer commented Aug 31, 2020

/backport to stable19

@rullzer
Copy link
Member Author

rullzer commented Aug 31, 2020

/backport to stable18

@rullzer
Copy link
Member Author

rullzer commented Aug 31, 2020

/backport to stable17

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants