rpuch commented on code in PR #1331:
URL: https://github.com/apache/ignite-3/pull/1331#discussion_r1021283999


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

Review Comment:
   Take a look at `FSMCallerTest:166` (`testOnSnapshotLoad()`). The test 
constructs a snapshot meta without peers/learners info (so `peers()` and 
`learners()` return `null`). Here, the `if` protects from such strange metas.
   
   In production code, `peers()` and `learners()` on `SnapshotMeta` never 
return `null`.



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

Reply via email to