tkalkirill commented on code in PR #1506: URL: https://github.com/apache/ignite-3/pull/1506#discussion_r1072251321
########## modules/storage-page-memory/src/main/java/org/apache/ignite/internal/storage/pagememory/index/sorted/PageMemorySortedIndexStorage.java: ########## @@ -247,28 +233,20 @@ public void close() { @Override public boolean hasNext() { - if (!closeBusyLock.enterBusy()) { - throwStorageClosedException(); - } + return busy(() -> { + throwExceptionIfStorageInProgressOfRebalance(state.get(), PageMemorySortedIndexStorage.this::createStorageInfo); - try { return cursor.hasNext(); - } finally { - closeBusyLock.leaveBusy(); - } + }); Review Comment: Same, but why not use a generic template for this class? -- 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