rpuch commented on code in PR #1331:
URL: https://github.com/apache/ignite-3/pull/1331#discussion_r1020242562
##########
modules/raft/src/main/java/org/apache/ignite/raft/jraft/core/FSMCallerImpl.java:
##########
@@ -497,6 +497,17 @@ private void doCommitted(final long committedIndex) {
final LogEntry logEntry = iterImpl.entry();
if (logEntry.getType() !=
EnumOutter.EntryType.ENTRY_TYPE_DATA) {
if (logEntry.getType() ==
EnumOutter.EntryType.ENTRY_TYPE_CONFIGURATION) {
+ ConfigurationEntry configurationEntry = new
ConfigurationEntry(
+ logEntry.getId().copy(),
+ new Configuration(logEntry.getPeers(),
logEntry.getLearners()),
+ null
+ );
+ if (logEntry.getOldPeers() != null &&
!logEntry.getOldPeers().isEmpty()) {
+ configurationEntry.setOldConf(new
Configuration(logEntry.getOldPeers(), logEntry.getOldLearners()));
+ }
+
+
this.fsm.onRawConfigurationCommitted(configurationEntry);
+
if (logEntry.getOldPeers() != null &&
!logEntry.getOldPeers().isEmpty()) {
// Joint stage is not supposed to be noticeable by
end users.
this.fsm.onConfigurationCommitted(new
Configuration(iterImpl.entry().getPeers()));
Review Comment:
They probably think that a state machine might have some interest in the
current peers, but not learners. I have no idea why, to be honest.
--
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]