mirror of
https://github.com/nextcloud/server.git
synced 2026-06-10 17:23:59 -04:00
Merge pull request #58608 from nextcloud/chunked-write-error-logging
fix: improve logging around failed chunked object store uploads
This commit is contained in:
commit
52d322aac7
1 changed files with 12 additions and 2 deletions
|
|
@ -818,14 +818,24 @@ class ObjectStoreStorage extends Common implements IChunkedFileWrite {
|
|||
$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,
|
||||
'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(
|
||||
'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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue