private void tryUploadPart() {
            for (; ; ) {
                List<DataBlock> uploadBlocks = new ArrayList<>(waitingUploadBlocks.size());
                boolean partFull = false;
                int size = 0;
                for (DataBlock block : waitingUploadBlocks) {
                    uploadBlocks.add(block);
                    size += block.size();
                    if (size >= partSizeThreshold) {
                        partFull = true;
                        break;
                    }
                }
                if (partFull) {
                    CompositeByteBuf partBuf = ByteBufAlloc.compositeByteBuffer();
                    for (DataBlock block : uploadBlocks) {
                        waitingUploadBlocksSize -= block.size();
                        partBuf.addComponent(true, block.buffer());
                    }
                    writer.write(partBuf);
                    completedBlocks.addAll(uploadBlocks);
                    waitingUploadBlocks.removeIf(uploadBlocks::contains);
                } else {
                    break;
                }
            }
        }
Create a new object writer.

@param objectId           object id
@param objectStorage      S3 operator
@param blockSizeThreshold the max size of a block
@param partSizeThreshold  the max size of a part. If it is smaller than {@link Writer#MIN_PART_SIZE}, it will be set to {@link Writer#MIN_PART_SIZE}.
@param writeOptions       the object storage write options
s3stream/src/main/java/com/automq/stream/s3/ObjectWriter.java