JAkutenshi commented on code in PR #4545: URL: https://github.com/apache/ignite-3/pull/4545#discussion_r1801085842
########## modules/metastorage/src/main/java/org/apache/ignite/internal/metastorage/impl/MetaStorageManagerImpl.java: ########## @@ -1027,20 +1031,21 @@ private <T> CompletableFuture<T> doWithOneOffRaftGroupService( PeersAndLearners raftClientConfiguration, Function<RaftGroupService, CompletableFuture<T>> action ) { - return startOneOffRaftGroupService(raftClientConfiguration) - .thenCompose(raftGroupService -> action.apply(raftGroupService) - .whenComplete((res, ex) -> raftGroupService.shutdown()) - ); - } - - private CompletableFuture<RaftGroupService> startOneOffRaftGroupService(PeersAndLearners newConfiguration) { try { - return raftMgr.startRaftGroupService(MetastorageGroupId.INSTANCE, newConfiguration); + RaftGroupService raftGroupService = startOneOffRaftGroupService(raftClientConfiguration); + + return action.apply(raftGroupService) + .whenComplete((res, ex) -> raftGroupService.shutdown()); } catch (NodeStoppingException e) { return failedFuture(e); } } + private RaftGroupService startOneOffRaftGroupService(PeersAndLearners newConfiguration) Review Comment: Fair, I left it because may be mention "one off" may be important and the method name carry this detail. Should we still left it as is or better remove the method and just left the comment (or even no)? I'm not so sure is it important mention. -- 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