rpuch commented on code in PR #1331:
URL: https://github.com/apache/ignite-3/pull/1331#discussion_r1021328655
##########
modules/raft/src/main/java/org/apache/ignite/raft/jraft/core/FSMCallerImpl.java:
##########
@@ -665,6 +676,27 @@ private void doSnapshotLoad(final LoadSnapshotClosure
done) {
setError(e);
return;
}
+
+ // JRaft tests use such strange metas, so we have to protect... in
production, these are never null.
+ if (meta.peersList() != null && meta.learnersList() != null) {
+ ConfigurationEntry configurationEntry = new ConfigurationEntry(
+ snapshotId.copy(),
+ new Configuration(
+
meta.peersList().stream().map(PeerId::parsePeer).collect(toList()),
+
meta.learnersList().stream().map(PeerId::parsePeer).collect(toList())
+ ),
+ new Configuration()
+ );
+ if (meta.oldPeersList() != null && !meta.oldPeersList().isEmpty())
{
+ configurationEntry.setOldConf(new Configuration(
+
meta.oldPeersList().stream().map(PeerId::parsePeer).collect(toList()),
Review Comment:
Are you asking about
https://github.com/apache/ignite-3/commit/aacb6ab15651a49f08a3841760537823cb8c34cf
? If yes, then yes, this commit was merged to `main` before I branched from
`main`, my branch contains it.
Am I doing something wrong? I can see in my tests that peers are now
identified with strings like `itrst_t_0` instead of `127.0.1.1:3344`, but
everything seems working fine.
##########
modules/raft/src/main/java/org/apache/ignite/raft/jraft/core/FSMCallerImpl.java:
##########
@@ -665,6 +676,27 @@ private void doSnapshotLoad(final LoadSnapshotClosure
done) {
setError(e);
return;
}
+
+ // JRaft tests use such strange metas, so we have to protect... in
production, these are never null.
+ if (meta.peersList() != null && meta.learnersList() != null) {
+ ConfigurationEntry configurationEntry = new ConfigurationEntry(
+ snapshotId.copy(),
+ new Configuration(
+
meta.peersList().stream().map(PeerId::parsePeer).collect(toList()),
+
meta.learnersList().stream().map(PeerId::parsePeer).collect(toList())
+ ),
+ new Configuration()
+ );
+ if (meta.oldPeersList() != null && !meta.oldPeersList().isEmpty())
{
+ configurationEntry.setOldConf(new Configuration(
+
meta.oldPeersList().stream().map(PeerId::parsePeer).collect(toList()),
Review Comment:
Are you asking about
https://github.com/apache/ignite-3/commit/aacb6ab15651a49f08a3841760537823cb8c34cf
? If yes, then sure, this commit was merged to `main` before I branched from
`main`, my branch contains it.
Am I doing something wrong? I can see in my tests that peers are now
identified with strings like `itrst_t_0` instead of `127.0.1.1:3344`, but
everything seems working fine.
--
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]