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/paimon.git
The following commit(s) were added to refs/heads/master by this push:
new 9d4a7ac05b Revert "[core] Add compaction.force-wait to support force
waiting compaction finish when preparing commit (#5994)" (#5995)
9d4a7ac05b is described below
commit 9d4a7ac05b28eba952c14954ca02967c0f573bd3
Author: yuzelin <[email protected]>
AuthorDate: Thu Jul 31 15:12:04 2025 +0800
Revert "[core] Add compaction.force-wait to support force waiting
compaction finish when preparing commit (#5994)" (#5995)
---
docs/layouts/shortcodes/generated/core_configuration.html | 6 ------
paimon-api/src/main/java/org/apache/paimon/CoreOptions.java | 13 +++++--------
.../src/test/java/org/apache/paimon/CoreOptionsTest.java | 7 -------
3 files changed, 5 insertions(+), 21 deletions(-)
diff --git a/docs/layouts/shortcodes/generated/core_configuration.html
b/docs/layouts/shortcodes/generated/core_configuration.html
index 09a7756877..c287901335 100644
--- a/docs/layouts/shortcodes/generated/core_configuration.html
+++ b/docs/layouts/shortcodes/generated/core_configuration.html
@@ -230,12 +230,6 @@ under the License.
<td>Boolean</td>
<td>If set to true, compaction strategy will always include all
level 0 files in candidates.</td>
</tr>
- <tr>
- <td><h5>compaction.force-wait</h5></td>
- <td style="word-wrap: break-word;">false</td>
- <td>Boolean</td>
- <td>If set to true, prepare commit will wait current compaction
finished.</td>
- </tr>
<tr>
<td><h5>compaction.max-size-amplification-percent</h5></td>
<td style="word-wrap: break-word;">200</td>
diff --git a/paimon-api/src/main/java/org/apache/paimon/CoreOptions.java
b/paimon-api/src/main/java/org/apache/paimon/CoreOptions.java
index eb36edf75f..54802731b4 100644
--- a/paimon-api/src/main/java/org/apache/paimon/CoreOptions.java
+++ b/paimon-api/src/main/java/org/apache/paimon/CoreOptions.java
@@ -682,13 +682,6 @@ public class CoreOptions implements Serializable {
.withDescription(
"If set to true, compaction strategy will always
include all level 0 files in candidates.");
- public static final ConfigOption<Boolean> COMPACTION_FORCE_WAIT =
- key("compaction.force-wait")
- .booleanType()
- .defaultValue(false)
- .withDescription(
- "If set to true, prepare commit will wait current
compaction finished.");
-
public static final ConfigOption<Integer> COMPACTION_SIZE_RATIO =
key("compaction.size-ratio")
.intType()
@@ -2903,7 +2896,11 @@ public class CoreOptions implements Serializable {
}
public boolean prepareCommitWaitCompaction() {
- return options.get(COMPACTION_FORCE_WAIT) || (needLookup() &&
options.get(LOOKUP_WAIT));
+ if (!needLookup()) {
+ return false;
+ }
+
+ return options.get(LOOKUP_WAIT);
}
public LookupCompactMode lookupCompact() {
diff --git a/paimon-core/src/test/java/org/apache/paimon/CoreOptionsTest.java
b/paimon-core/src/test/java/org/apache/paimon/CoreOptionsTest.java
index 44028c0ee0..bf5445fc10 100644
--- a/paimon-core/src/test/java/org/apache/paimon/CoreOptionsTest.java
+++ b/paimon-core/src/test/java/org/apache/paimon/CoreOptionsTest.java
@@ -72,10 +72,6 @@ public class CoreOptionsTest {
assertThat(options.prepareCommitWaitCompaction()).isFalse();
- conf.set(CoreOptions.COMPACTION_FORCE_WAIT, true);
- assertThat(options.prepareCommitWaitCompaction()).isTrue();
- conf.remove(CoreOptions.COMPACTION_FORCE_WAIT.key());
-
conf.set(CoreOptions.DELETION_VECTORS_ENABLED, true);
assertThat(options.prepareCommitWaitCompaction()).isTrue();
conf.remove(CoreOptions.DELETION_VECTORS_ENABLED.key());
@@ -89,8 +85,5 @@ public class CoreOptionsTest {
conf.set(CoreOptions.LOOKUP_WAIT, false);
assertThat(options.prepareCommitWaitCompaction()).isFalse();
-
- conf.set(CoreOptions.COMPACTION_FORCE_WAIT, true);
- assertThat(options.prepareCommitWaitCompaction()).isTrue();
}
}