JAkutenshi commented on code in PR #3633:
URL: https://github.com/apache/ignite-3/pull/3633#discussion_r1594562230
##########
modules/replicator/src/main/java/org/apache/ignite/internal/replicator/ReplicaManager.java:
##########
@@ -465,29 +461,101 @@ private void stopLeaseProlongation(ReplicationGroupId
groupId, @Nullable String
});
}
+ public CompletableFuture<Replica> getReplica(ReplicationGroupId
replicationGroupId) {
+ return replicas.get(replicationGroupId);
+ }
+
+ public boolean isRaftClientStarted(RaftNodeId raftNodeId) {
+ return ((Loza) raftManager).isStarted(raftNodeId);
+ }
+
+ public void resetPeers(RaftNodeId raftNodeId, PeersAndLearners
peersAndLearners) {
+ ((Loza) raftManager).resetPeers(raftNodeId, peersAndLearners);
+ }
+
+ public LogSyncer getLogSyncer() {
+ return raftManager.getLogSyncer();
+ }
+
+ /**
+ * TODO.
+ *
+ * @param isVolatileStorage TODO
+ * @param volatileLogStorageFactoryCreator TODO
+ * @return TODO
+ */
+ public RaftGroupOptions createRaftGroupOptions(boolean isVolatileStorage,
LogStorageFactoryCreator volatileLogStorageFactoryCreator) {
+ if (isVolatileStorage) {
+ LogStorageBudgetView view = ((Loza)
raftManager).volatileRaft().logStorage().value();
+ return RaftGroupOptions.forVolatileStores()
+ // TODO: use RaftManager interface, see
https://issues.apache.org/jira/browse/IGNITE-18273
+
.setLogStorageFactory(volatileLogStorageFactoryCreator.factory(view))
+ .raftMetaStorageFactory((groupId, raftOptions) -> new
VolatileRaftMetaStorage());
+ } else {
+ return RaftGroupOptions.forPersistentStores();
+ }
+ }
+
+ /**
+ * TODO.
+ *
+ * @param groupOptions TODO
+ * @param raftGrpLsnr TODO
+ * @param raftGrpEvtsLsnr TODO
+ * @param raftNodeId TODO
+ * @param stableConfiguration TODO
+ * @throws NodeStoppingException TODO
+ */
+ public void startPartitionRaftGroupNode(
Review Comment:
❌ ❓ The next 3 arguments are being created in `TableManager`:
```
RaftGroupListener raftGrpLsnr
RaftGroupEventsListener raftGrpEvtsLsnr
RaftGroupOptions groupOptions
```
Some requires storages etc.. I can pass them through another lambda -- will
it better solution for the ticket purposes?
--
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]