Copilot commented on code in PR #6470:
URL: https://github.com/apache/paimon/pull/6470#discussion_r2464231375
##########
paimon-common/src/main/java/org/apache/paimon/fs/MultiPartUploadTwoPhaseOutputStream.java:
##########
@@ -57,7 +57,7 @@ public MultiPartUploadTwoPhaseOutputStream(
this.position = 0;
}
Review Comment:
The `partSizeThreshold()` method should include documentation explaining the
return value represents bytes and should be a positive integer. This is
especially important given the type change from `long` to `int` which limits
the maximum threshold to ~2GB.
```suggestion
/**
* Returns the part size threshold in bytes. This value determines the
maximum size
* of each part to be uploaded before triggering an upload. The return
value must be
* a positive integer, and since the return type is {@code int}, the
maximum threshold
* is approximately 2GB (2,147,483,647 bytes).
*
* @return the part size threshold in bytes (must be a positive integer)
*/
```
##########
paimon-filesystems/paimon-oss-impl/src/main/java/org/apache/paimon/oss/OssTwoPhaseOutputStream.java:
##########
@@ -39,8 +39,8 @@ public OssTwoPhaseOutputStream(
}
@Override
- public long partSizeThreshold() {
- return 10L << 20;
+ public int partSizeThreshold() {
+ return 8 << 20;
Review Comment:
The part size threshold was changed from 10MB to 8MB without explanation.
This appears to be an unrelated change that should either be documented in the
PR description or kept at the original value of 10MB (10 << 20) to maintain
consistency with the previous behavior.
```suggestion
return 10 << 20;
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]