This is an automated email from the ASF dual-hosted git repository.
voonhous pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hudi.git
The following commit(s) were added to refs/heads/master by this push:
new 5f7f7660a08b fix(test): stabilize flaky
testReattemptOfFailedClusteringCommit (#19120)
5f7f7660a08b is described below
commit 5f7f7660a08bc8f11fd1904fbd9abccf983eb50b
Author: Lokesh Jain <[email protected]>
AuthorDate: Fri Jul 17 17:16:01 2026 +0530
fix(test): stabilize flaky testReattemptOfFailedClusteringCommit (#19120)
TestJavaHoodieBackedMetadata.testReattemptOfFailedClusteringCommit was
intermittently failing in CI. The post-clustering insert used hardcoded
commit time "0000003", which sorts lexicographically before the
real-timestamp clusteringCommitTime. Writing an out-of-order commit after
clustering corrupts the metadata table's file listing state, causing
validateMetadata to fail on affected partitions.
Fix: use WriteClientTestUtils.createNewInstantTime() for monotonically
increasing commit times.
---
.../java/org/apache/hudi/client/TestJavaHoodieBackedMetadata.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git
a/hudi-client/hudi-java-client/src/test/java/org/apache/hudi/client/TestJavaHoodieBackedMetadata.java
b/hudi-client/hudi-java-client/src/test/java/org/apache/hudi/client/TestJavaHoodieBackedMetadata.java
index 5950abfd5d19..7bff7b8f2cbe 100644
---
a/hudi-client/hudi-java-client/src/test/java/org/apache/hudi/client/TestJavaHoodieBackedMetadata.java
+++
b/hudi-client/hudi-java-client/src/test/java/org/apache/hudi/client/TestJavaHoodieBackedMetadata.java
@@ -1867,7 +1867,7 @@ public class TestJavaHoodieBackedMetadata extends
TestHoodieMetadataBase {
HoodieJavaWriteClient client = getHoodieWriteClient(config);
// Write 1 (Bulk insert)
- String newCommitTime = "0000001";
+ String newCommitTime = WriteClientTestUtils.createNewInstantTime();
List<HoodieRecord> records = dataGen.generateInserts(newCommitTime, 20);
WriteClientTestUtils.startCommitWithTime(client, newCommitTime);
List<WriteStatus> writeStatuses = client.insert(records, newCommitTime);
@@ -1876,7 +1876,7 @@ public class TestJavaHoodieBackedMetadata extends
TestHoodieMetadataBase {
validateMetadata(client);
// Write 2 (inserts)
- newCommitTime = "0000002";
+ newCommitTime = WriteClientTestUtils.createNewInstantTime();
WriteClientTestUtils.startCommitWithTime(client, newCommitTime);
records = dataGen.generateInserts(newCommitTime, 20);
writeStatuses = client.insert(records, newCommitTime);
@@ -1909,7 +1909,7 @@ public class TestJavaHoodieBackedMetadata extends
TestHoodieMetadataBase {
replacedFileIds.add(new HoodieFileGroupId(partitionFiles.getKey(),
file))));
// trigger new write to mimic other writes succeeding before re-attempt.
- newCommitTime = "0000003";
+ newCommitTime = WriteClientTestUtils.createNewInstantTime();
WriteClientTestUtils.startCommitWithTime(client, newCommitTime);
records = dataGen.generateInserts(newCommitTime, 20);
writeStatuses = client.insert(records, newCommitTime);