From 2c2335b8b40a2ed347b9c8e93089c5f3d78c062d Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Fri, 27 Feb 2026 14:50:49 +0100 Subject: [PATCH] fix: improve logging around failed chunked object store uploads Signed-off-by: Robin Appelman --- lib/private/Files/ObjectStore/ObjectStoreStorage.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/lib/private/Files/ObjectStore/ObjectStoreStorage.php b/lib/private/Files/ObjectStore/ObjectStoreStorage.php index a28475e0e4b1a..91b0e0f1f01a1 100644 --- a/lib/private/Files/ObjectStore/ObjectStoreStorage.php +++ b/lib/private/Files/ObjectStore/ObjectStoreStorage.php @@ -800,7 +800,6 @@ 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, [ @@ -808,6 +807,17 @@ public function completeChunkedWrite(string $targetPath, string $writeToken): in '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, + [ + 'app' => 'objectstore', + 'exception' => $e, + ] + ); + } throw new GenericFileException('Could not write chunked file'); } return $size;