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


##########
modules/table/src/main/java/org/apache/ignite/internal/table/TableImpl.java:
##########
@@ -361,33 +348,21 @@ public void registerSortedIndex(
     public void unregisterIndex(UUID indexId) {
         indexLockerFactories.remove(indexId);
         indexStorageAdapterFactories.remove(indexId);
+
+        CompletableFuture<?> indexToWaitFuture = indexesToWait.remove(indexId);
+
+        if (indexToWaitFuture != null) {
+            indexToWaitFuture.complete(null);
+        }
     }
 
     private void awaitIndexes() {
         // TODO: replace with actual call to ids supplier
-        List<UUID> indexIds = List.of(pkId()); // activeIndexIds.get();
-
         List<CompletableFuture<?>> toWait = new ArrayList<>();
 
-        for (UUID indexId : indexIds) {
-            if (indexLockerFactories.containsKey(indexId) && 
indexStorageAdapterFactories.containsKey(indexId)) {

Review Comment:
   If the index is registered, then the future of waiting for the indexes will 
not be or  completed, so there is no need to check the maps.



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