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


##########
modules/table/src/main/java/org/apache/ignite/internal/table/distributed/TableManager.java:
##########
@@ -2495,4 +2497,31 @@ public int tableId() {
             return tableId;
         }
     }
+
+    private void cleanUpResourcesForDroppedTablesOnRecoveryBusy() {
+        // TODO: IGNITE-20384 Clean up abandoned resources for dropped zones 
from volt and metastore
+        for (DroppedTableInfo droppedTableInfo : droppedTables(catalogService, 
lowWatermark.getLowWatermark())) {
+            int catalogVersion = droppedTableInfo.tableRemovalCatalogVersion() 
- 1;
+
+            CatalogTableDescriptor tableDescriptor = 
catalogService.table(droppedTableInfo.tableId(), catalogVersion);
+
+            assert tableDescriptor != null : "tableId=" + 
droppedTableInfo.tableId() + ", catalogVersion=" + catalogVersion;
+
+            CatalogZoneDescriptor zoneDescriptor = 
catalogService.zone(tableDescriptor.zoneId(), catalogVersion);
+
+            assert zoneDescriptor != null : "zoneId=" + 
tableDescriptor.zoneId() + ", catalogVersion=" + catalogVersion;
+
+            destroyTableStorageOnRecoveryBusy(tableDescriptor, zoneDescriptor);
+        }
+    }
+
+    private void destroyTableStorageOnRecoveryBusy(CatalogTableDescriptor 
tableDescriptor, CatalogZoneDescriptor zoneDescriptor) {
+        StorageEngine engine = 
dataStorageMgr.engine(zoneDescriptor.dataStorage().engine());
+
+        assert engine != null : "tableId=" + tableDescriptor.id() + ", 
engineName=" + zoneDescriptor.dataStorage().engine();
+
+        if (!engine.isVolatile()) {

Review Comment:
   Fair enough.



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