@Override
    public CompletableFuture<Void> release() {
        List<CompletableFuture<AbstractObjectStorage.ObjectStorageCompletedPart>> partsToWait = parts;
        if (objectPart != null) {
            // skip waiting for pending part
            partsToWait = partsToWait.subList(0, partsToWait.size() - 1);
        }
        // wait for all ongoing uploading parts to finish and release pending part
        return CompletableFuture.allOf(partsToWait.toArray(new CompletableFuture[0])).whenComplete((nil, ex) -> {
            if (objectPart != null) {
                objectPart.release();
            }
        });
    }
The minPartSize represents the minimum size of a part for a multipart object.
s3stream/src/main/java/com/automq/stream/s3/operator/MultiPartWriter.java