sanpwc commented on code in PR #4256:
URL: https://github.com/apache/ignite-3/pull/4256#discussion_r1761437347


##########
modules/raft/src/main/java/org/apache/ignite/internal/raft/server/impl/JraftServerImpl.java:
##########
@@ -856,4 +860,54 @@ public void onLeaderStart(long term) {
             listener.onLeaderStart();
         }
     }
+
+    /** Returns raft group state accessor. */
+    public <G extends ReplicationGroupId, L> RaftGroupStateProvider<G, L> 
getGroupStateProvider(
+            Class<G> groupType,
+            Class<L> groupListenerType
+    ) {
+        return new StateProviderImpl<>(groupType, groupListenerType, nodes);
+    }
+
+    private static class StateProviderImpl<G extends ReplicationGroupId, L> 
implements RaftGroupStateProvider<G, L> {

Review Comment:
   Still seems a bit too complicated to me.
   Why not to introduce new service MinimumRequiredTimeCollectorService, 
instantiate it in IgniteImpl and propagate to TableManager -> 
PartitionListener, similar to what you've did with MinimumRequiredTimeProvider? 
Internally MinimumRequiredTimeCollectorService will be a map partitionId -> 
minTxStartTime, where all partitionListeneners will put (localId, 
minTxStartTime) on handleUpdateMinimalActiveTxTimeCommand.
   
   Seems simpler, though I can't say that it's beautiful.
   



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

Reply via email to