This is an automated email from the ASF dual-hosted git repository.
Caideyipi pushed a commit to branch load-it
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/load-it by this push:
new 63c0259d117 fix
63c0259d117 is described below
commit 63c0259d117488ff6b3e5188c2a8606a18da4aa2
Author: Caideyipi <[email protected]>
AuthorDate: Thu May 21 10:10:20 2026 +0800
fix
---
.../iotdb/db/it/IoTDBLoadTsFileWithModIT.java | 22 +++++++++++++++-------
1 file changed, 15 insertions(+), 7 deletions(-)
diff --git
a/integration-test/src/test/java/org/apache/iotdb/db/it/IoTDBLoadTsFileWithModIT.java
b/integration-test/src/test/java/org/apache/iotdb/db/it/IoTDBLoadTsFileWithModIT.java
index 6ce16950946..772f661eff5 100644
---
a/integration-test/src/test/java/org/apache/iotdb/db/it/IoTDBLoadTsFileWithModIT.java
+++
b/integration-test/src/test/java/org/apache/iotdb/db/it/IoTDBLoadTsFileWithModIT.java
@@ -33,6 +33,7 @@ import org.apache.iotdb.it.env.EnvFactory;
import org.apache.iotdb.it.framework.IoTDBTestRunner;
import org.apache.iotdb.itbase.category.ClusterIT;
import org.apache.iotdb.itbase.category.LocalStandaloneIT;
+import org.apache.iotdb.itbase.exception.InconsistentDataException;
import org.apache.tsfile.enums.TSDataType;
import org.apache.tsfile.exception.write.WriteProcessException;
@@ -222,22 +223,29 @@ public class IoTDBLoadTsFileWithModIT {
tmpDir.getAbsolutePath(), databaseName));
boolean databaseFound = false;
- out:
for (int i = 0; i < 10; i++) {
try (final ResultSet resultSet = statement.executeQuery("show
databases")) {
while (resultSet.next()) {
final String currentDatabase = resultSet.getString(1);
if (databaseName.equalsIgnoreCase(currentDatabase)) {
databaseFound = true;
- break out;
+ break;
}
}
+ } catch (InconsistentDataException ignored) {
+ // Async load propagates the new database metadata to different
DataNodes at
+ // slightly different times, so "show databases" may be
inconsistent transiently.
+ }
- try {
- Thread.sleep(1000);
- } catch (InterruptedException e) {
- break;
- }
+ if (databaseFound) {
+ break;
+ }
+
+ try {
+ Thread.sleep(1000);
+ } catch (InterruptedException e) {
+ Thread.currentThread().interrupt();
+ break;
}
}
Assert.assertTrue(