Akash3121 commented on code in PR #11170:
URL: https://github.com/apache/paimon/pull/11170#discussion_r4579292736
##########
paimon-core/src/main/java/org/apache/paimon/operation/ManifestPickStrategy.java:
##########
@@ -72,11 +79,13 @@ public List<ManifestAdjacentSortedRun>
pick(List<ManifestAdjacentSortedRun> leve
}
/**
- * SizeAmp check: if all lower-level (0~3) runs' total size exceeds the
highest-level run's size
- * by more than {@code sizeAmpThreshold} percent, pick all runs for full
compaction.
+ * SizeAmp check: if the total size of all lower-level (0~3) runs is
greater than {@code
+ * sizeAmpThreshold} percent of the highest-level run's size, pick all
runs for full compaction.
*
- * <p>Formula (consistent with {@code
UniversalCompaction#pickForSizeAmp}): {@code
- * lowerLevelTotalSize * 100 > sizeAmpThreshold * highestRunSize}
+ * <p>{@code sizeAmpThreshold} is a percentage of the highest-level run's
size, not an
+ * additional-size percentage and not a multiplier. Formula (consistent
with {@code
+ * UniversalCompaction#pickForSizeAmp}): {@code lowerLevelTotalSize * 100
> sizeAmpThreshold *
+ * highestRunSize}
Review Comment:
LGTM
Minor wording nit: lines around 109 below (and
`UniversalCompaction#pickForSizeAmp` /
`CoreOptions.COMPACTION_MAX_SIZE_AMPLIFICATION_PERCENT`) refers to
`lowerLevelTotalSize / highestRunSize` as the `"percentage of additional size"`
(since the lower-level runs are the additional storage on top of the
highest-level base run), so saying `"not an additional-size percentage"` here
slightly clashes with line 109.
We can simplify this paragraph so it doesn't conflict with that terminology:
```suggestion
* <p>{@code sizeAmpThreshold} is a percentage of the highest-level
run's size (not a raw
* multiplier). Formula (consistent with {@code
UniversalCompaction#pickForSizeAmp}): {@code
* lowerLevelTotalSize * 100 > sizeAmpThreshold * highestRunSize}
```
--
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]