fix: OOM with S3:PutObject (#620)

This commit is contained in:
Mike Pettypiece authored and GitHub committed 2026-04-27 20:40:11 -05:00
1 parent e6341cfc09
commit 15f51ea7c3
2 files changed
+41 -3

No files matched your search

@@ -334,6 +334,8 @@ public class S3Service {
writeFile(bucketName, key, data);
LOG.debugv("Put object: {0}/{1} ({2} bytes)", bucketName, key, data.length);
}
// Release cached payload reference - data is now persisted to disk (or to memoryDataStore in inMemory mode)
object.setData(null);
return object;
}
@@ -392,9 +394,7 @@ public class S3Service {
}
public S3Object getObjectMetadata(String bucketName, String key, String versionId) {
S3Object copy = copyObject(getStoredObject(bucketName, key, versionId));
copy.setData(null);
return copy;
return copyObject(getStoredObject(bucketName, key, versionId));
}
public GetObjectAttributesResult getObjectAttributes(String bucketName, String key, String versionId,