tkalkirill commented on code in PR #2686:
URL: https://github.com/apache/ignite-3/pull/2686#discussion_r1357850062


##########
modules/runner/src/integrationTest/java/org/apache/ignite/internal/sql/engine/ItBuildIndexTest.java:
##########
@@ -181,25 +177,8 @@ TABLE_NAME, toValuesString(List.of(1, 1), List.of(2, 2), 
List.of(3, 3), List.of(
         ));
     }
 
-    private static void createIndex(String indexName) throws Exception {
+    private static void createIndex(String indexName) {
         sql(IgniteStringFormatter.format("CREATE INDEX {} ON {} (i1)", 
indexName, TABLE_NAME));
-
-        waitForIndex(indexName);

Review Comment:
   Why did you remove the index wait?



##########
modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/ItIgniteNodeRestartTest.java:
##########
@@ -1230,13 +1226,11 @@ private void createTableWithData(List<IgniteImpl> 
nodes, String name, int replic
         }
     }
 
-    private void waitForIndex(Collection<IgniteImpl> nodes, String indexName) 
throws InterruptedException {
-        // FIXME: Wait for the index to be created on all nodes,
-        //  this is a workaround for 
https://issues.apache.org/jira/browse/IGNITE-18733 to avoid missed updates to 
the PK index.
+    private void waitForIndexToBecomeAvailable(Collection<IgniteImpl> nodes, 
String indexName) throws InterruptedException {
         assertTrue(waitForCondition(
                 () -> nodes.stream()
                         .map(nodeImpl -> 
nodeImpl.catalogManager().index(indexName.toUpperCase(), 
nodeImpl.clock().nowLong()))
-                        .allMatch(Objects::nonNull),
+                        .allMatch(indexDescriptor -> indexDescriptor != null 
&& !indexDescriptor.writeOnly()),

Review Comment:
   I think it's better to use 
`org.apache.ignite.internal.catalog.events.CatalogEvent#INDEX_AVAILABLE`.



-- 
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