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 4708c73535 [spark] Fix flaky row tracking concurrent compaction test 
(#9475)
4708c73535 is described below

commit 4708c735359ae2dfdbc13c83b795703bc275e716
Author: Jingsong Lee <[email protected]>
AuthorDate: Sun Aug 30 20:18:32 2026 +0800

    [spark] Fix flaky row tracking concurrent compaction test (#9475)
---
 .../apache/paimon/spark/sql/RowTrackingTestBase.scala    | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git 
a/paimon-spark/paimon-spark-ut/src/test/scala/org/apache/paimon/spark/sql/RowTrackingTestBase.scala
 
b/paimon-spark/paimon-spark-ut/src/test/scala/org/apache/paimon/spark/sql/RowTrackingTestBase.scala
index 60527e913b..1560bbca92 100644
--- 
a/paimon-spark/paimon-spark-ut/src/test/scala/org/apache/paimon/spark/sql/RowTrackingTestBase.scala
+++ 
b/paimon-spark/paimon-spark-ut/src/test/scala/org/apache/paimon/spark/sql/RowTrackingTestBase.scala
@@ -117,15 +117,19 @@ abstract class RowTrackingTestBase extends 
PaimonSparkTestBase with AdaptiveSpar
       }
 
       val compact = Future {
-        for (_ <- 1 to 10) {
-          while (!canBeCompacted) {
+        var hasCompacted = false
+        while (!mergeInto.isCompleted || canBeCompacted) {
+          if (canBeCompacted) {
+            sql("CALL sys.compact(table => 't')")
+            val snapshot = t.latestSnapshot().get()
+            assert(snapshot.totalRecordCount > 0)
+            assert(snapshot.totalRecordCount < 12)
+            hasCompacted = true
+          } else {
             Thread.sleep(1)
           }
-          sql("CALL sys.compact(table => 't')")
-          val snapshot = t.latestSnapshot().get()
-          assert(snapshot.totalRecordCount > 0)
-          assert(snapshot.totalRecordCount < 12)
         }
+        assert(hasCompacted)
       }
 
       Await.result(mergeInto, 60.seconds)

Reply via email to