xxubai commented on code in PR #4324:
URL: https://github.com/apache/amoro/pull/4324#discussion_r3800693563


##########
amoro-common/src/main/java/org/apache/amoro/config/OptimizingConfig.java:
##########
@@ -226,7 +226,9 @@ public OptimizingConfig setMinTargetSizeRatio(double 
minTargetSizeRatio) {
   }
 
   public long maxFragmentSize() {
-    return targetSize / fragmentRatio;
+    // A non-positive fragment ratio (misconfigured property or legacy 
persisted value) means
+    // "no fragmenting": fall back to the target size instead of dividing by 
zero in planners.
+    return fragmentRatio <= 0 ? targetSize : targetSize / fragmentRatio;

Review Comment:
   the default `target-size` is 134217728 which is too large



-- 
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]

Reply via email to