tkalkirill commented on code in PR #1506:
URL: https://github.com/apache/ignite-3/pull/1506#discussion_r1072279893
##########
modules/storage-page-memory/src/main/java/org/apache/ignite/internal/storage/pagememory/mv/PersistentPageMemoryMvPartitionStorage.java:
##########
@@ -216,51 +197,41 @@ public void lastApplied(long lastAppliedIndex, long
lastAppliedTerm) throws Stor
@Override
public long persistedIndex() {
- if (!closeBusyLock.enterBusy()) {
- throwStorageClosedException();
- }
-
- try {
- return persistedIndex;
- } finally {
- closeBusyLock.leaveBusy();
- }
+ return busy(() -> persistedIndex);
}
@Override
@Nullable
public RaftGroupConfiguration committedGroupConfiguration() {
- if (!closeBusyLock.enterBusy()) {
- throwStorageClosedException();
- }
-
- try {
- replicationProtocolGroupConfigReadWriteLock.readLock().lock();
-
+ return busy(() -> {
Review Comment:
Tried to fix it.
--
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]