This is an automated email from the ASF dual-hosted git repository. lzljs3620320 pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/flink-table-store.git
The following commit(s) were added to refs/heads/master by this push: new ff5b10c3 [hotfix] Adjust numLevels to numSortedRunCompactionTrigger + 1 by default ff5b10c3 is described below commit ff5b10c35a8e17d2ce43d699044adfe3797b8596 Author: JingsongLi <lzljs3620...@aliyun.com> AuthorDate: Wed Jul 20 18:29:25 2022 +0800 [hotfix] Adjust numLevels to numSortedRunCompactionTrigger + 1 by default --- .../src/main/java/org/apache/flink/table/store/CoreOptions.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/flink-table-store-core/src/main/java/org/apache/flink/table/store/CoreOptions.java b/flink-table-store-core/src/main/java/org/apache/flink/table/store/CoreOptions.java index 8a7a5362..e78dbee9 100644 --- a/flink-table-store-core/src/main/java/org/apache/flink/table/store/CoreOptions.java +++ b/flink-table-store-core/src/main/java/org/apache/flink/table/store/CoreOptions.java @@ -414,7 +414,11 @@ public class CoreOptions implements Serializable { // By default, this ensures that the compaction does not fall to level 0, but at least to // level 1 Integer numLevels = options.get(NUM_LEVELS); - numLevels = numLevels == null ? numSortedRunStopTrigger() + 1 : numLevels; + int expectedRuns = + maxSortedRunNum() == Integer.MAX_VALUE + ? numSortedRunCompactionTrigger() + : numSortedRunStopTrigger(); + numLevels = numLevels == null ? expectedRuns + 1 : numLevels; return numLevels; }