Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion lib/private/Files/ObjectStore/ObjectStoreStorage.php
Original file line number Diff line number Diff line change
Expand Up @@ -800,14 +800,24 @@ public function completeChunkedWrite(string $targetPath, string $writeToken): in
$this->getCache()->update($stat['fileid'], $stat);
}
} catch (S3MultipartUploadException|S3Exception $e) {
$this->objectStore->abortMultipartUpload($urn, $writeToken);
$this->logger->error(
'Could not complete multipart upload ' . $urn . ' with uploadId ' . $writeToken,
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
'Could not complete multipart upload ' . $urn . ' with uploadId ' . $writeToken,
'Unable to complete multipart upload for "' . $urn . '" (uploadId: "' . $writeToken . '")',

[
'app' => 'objectstore',
'exception' => $e,
]
);
try {
$this->objectStore->abortMultipartUpload($urn, $writeToken);
} catch (S3Exception $e) {
$this->logger->error(
'Failed to abort multi-part upload for ' . $urn . ' with uploadId ' . $writeToken,
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
'Failed to abort multi-part upload for ' . $urn . ' with uploadId ' . $writeToken,
'Unable to abort multipart upload for "' . $urn . '" (uploadId: "' . $writeToken . '") after completion error',

[
'app' => 'objectstore',
'exception' => $e,
]
);
}
throw new GenericFileException('Could not write chunked file');
}
return $size;
Expand Down
Loading