xichen01 commented on code in PR #4572:
URL: https://github.com/apache/ozone/pull/4572#discussion_r1169446670
##########
hadoop-hdds/common/src/main/java/org/apache/hadoop/ozone/OzoneConsts.java:
##########
@@ -373,6 +373,7 @@ private OzoneConsts() {
// For Multipart upload
public static final int OM_MULTIPART_MIN_SIZE = 5 * 1024 * 1024;
+ public static final int OM_MULTIPART_MAX_PART_NUMBER = 10000;
Review Comment:
`OM_MULTIPART_MAX_PART_NUMBER` has already been applied before, no more than
10000 parts are allowed to be uploaded.
enforcing OM_MULTIPART_MAX_PART_NUMBER is a redundancy constraint to prevent
any unexpected situation that would cause `IntSparseMap` to insert too many
elements and waste memory.
```java
public Builder() {
this.partKeyInfoList =
new IntSparseMap<>(EMPTY_PART_KEY_INFO,
OM_MULTIPART_MAX_PART_NUMBER);
}
```
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]