sashapolo commented on code in PR #3399:
URL: https://github.com/apache/ignite-3/pull/3399#discussion_r1524352528


##########
modules/storage-api/src/testFixtures/java/org/apache/ignite/internal/storage/AbstractMvTableStorageTest.java:
##########
@@ -760,6 +801,41 @@ void testNextRowIdToBuiltAfterRestart() throws Exception {
         }
     }
 
+    @Test
+    public void testIndexDestructionOnRecovery() throws Exception {
+        Assumptions.assumeFalse(tableStorage.isVolatile(), "Volatile storages 
do not support index recovery");

Review Comment:
   Fixed



##########
modules/storage-page-memory/src/main/java/org/apache/ignite/internal/storage/pagememory/mv/PageMemoryIndexes.java:
##########
@@ -105,8 +109,17 @@ void performRecovery(
                 StorageIndexDescriptor indexDescriptor = 
indexDescriptorSupplier.get(indexId);
 
                 if (indexDescriptor == null) {
-                    // TODO: IGNITE-21671 destroy the index if it can't be 
found in the Catalog.
-                    continue;
+                    // Index has not been found in the Catalog, we can treat 
it as destroyed and remove the storage.
+                    runConsistently.accept(locker -> {
+                        destroyIndexOnRecovery(indexMeta, indexStorageFactory, 
indexMetaTree)
+                                .whenComplete((v, e) -> {
+                                    if (e != null) {
+                                        LOG.error("Unable to destroy existing 
index that has been removed from the Catalog", e);

Review Comment:
   Fixed



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