tkalkirill commented on code in PR #5725: URL: https://github.com/apache/ignite-3/pull/5725#discussion_r2068161590
########## modules/index/src/main/java/org/apache/ignite/internal/index/IndexBuildController.java: ########## @@ -541,7 +545,12 @@ private static MvPartitionStorage mvPartitionStorage( int tableId, int partitionId ) { - MvPartitionStorage mvPartition = mvTableStorage.getMvPartition(partitionId); + MvPartitionStorage mvPartition; Review Comment: Maybe in a separate method to make it look more elegant? ########## modules/index/src/main/java/org/apache/ignite/internal/index/IndexBuildController.java: ########## @@ -554,10 +563,23 @@ private static IndexStorage indexStorage( int partitionId, CatalogIndexDescriptor indexDescriptor ) { - IndexStorage indexStorage = mvTableStorage.getIndex(partitionId, indexDescriptor.id()); + IndexStorage indexStorage; + try { + indexStorage = mvTableStorage.getIndex(partitionId, indexDescriptor.id()); + } catch (StorageClosedException e) { + throw new TableClosedException(indexDescriptor.tableId(), e); + } assert indexStorage != null : "Index storage is missing [partitionId=" + partitionId + ", indexId=" + indexDescriptor.id() + "]."; return indexStorage; } + + private static class TableClosedException extends IgniteInternalException { Review Comment: I prefer the practice of using a packaged private class instead of an internal one, I would change it, at your discretion. ########## modules/index/src/main/java/org/apache/ignite/internal/index/IndexBuildController.java: ########## @@ -554,10 +563,23 @@ private static IndexStorage indexStorage( int partitionId, CatalogIndexDescriptor indexDescriptor ) { - IndexStorage indexStorage = mvTableStorage.getIndex(partitionId, indexDescriptor.id()); + IndexStorage indexStorage; Review Comment: Maybe in a separate method to make it look more elegant? -- 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: notifications-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org