This is an automated email from the ASF dual-hosted git repository.

JingsongLi 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 24077a6c4e [core] Fix race in FormatTableCommitTest interrupted 
cleanup abort test (#11268)
24077a6c4e is described below

commit 24077a6c4e87729a0602c601e23b457da022d091
Author: YueZhang <[email protected]>
AuthorDate: Thu Nov 19 23:17:08 2026 -0500

    [core] Fix race in FormatTableCommitTest interrupted cleanup abort test 
(#11268)
---
 .../org/apache/paimon/table/format/FormatTableCommitTest.java     | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git 
a/paimon-core/src/test/java/org/apache/paimon/table/format/FormatTableCommitTest.java
 
b/paimon-core/src/test/java/org/apache/paimon/table/format/FormatTableCommitTest.java
index 590d0398f5..1636c82b2b 100644
--- 
a/paimon-core/src/test/java/org/apache/paimon/table/format/FormatTableCommitTest.java
+++ 
b/paimon-core/src/test/java/org/apache/paimon/table/format/FormatTableCommitTest.java
@@ -56,6 +56,7 @@ import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
 import java.security.AccessController;
 import java.security.PrivilegedAction;
+import java.time.Duration;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collections;
@@ -82,6 +83,7 @@ import java.util.function.Function;
 import static org.apache.paimon.CoreOptions.PARTITION_DEFAULT_NAME;
 import static 
org.apache.paimon.shade.guava30.com.google.common.base.Throwables.getCausalChain;
 import static 
org.apache.paimon.shade.guava30.com.google.common.base.Throwables.getRootCause;
+import static org.apache.paimon.utils.CommonTestUtils.waitUtil;
 import static org.assertj.core.api.Assertions.assertThat;
 import static org.assertj.core.api.Assertions.assertThatThrownBy;
 import static org.assertj.core.api.Assertions.catchThrowable;
@@ -3013,6 +3015,12 @@ class FormatTableCommitTest {
         try {
             assertThat(fileIO.awaitDeletesStarted()).isTrue();
             commitThread.interrupt();
+            // Only the caller clears its flag, by observing the interrupt. 
Releasing earlier lets
+            // the deletes finish first, and a caller with completed results 
keeps going.
+            waitUtil(
+                    () -> !commitThread.isInterrupted(),
+                    Duration.ofSeconds(10),
+                    Duration.ofMillis(1));
             fileIO.releaseDeletes();
             commitThread.join(TimeUnit.SECONDS.toMillis(10));
         } finally {

Reply via email to