luoluoyuyu commented on code in PR #17730:
URL: https://github.com/apache/iotdb/pull/17730#discussion_r3309321950


##########
integration-test/src/test/java/org/apache/iotdb/db/it/IoTDBLoadTsFileWithModIT.java:
##########
@@ -222,22 +223,29 @@ public void testWithNewModFileAndLoadAttributes()
                 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) {

Review Comment:
   捕获 `InconsistentDataException` 后 `ignored` 重试是合理的 workaround。
   
   **建议(非阻塞)**:若 `InconsistentDataException` 持续 10 次仍失败,最终 
`Assert.assertTrue(databaseFound)` 的错误信息不会提及不一致原因,排障较难。可考虑在最后一次失败时 wrap 并附带 
retry 次数,或使用 `Awaitility` 统一重试逻辑(与项目其他 IT 一致)。



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to