bitflicker64 commented on code in PR #3376:
URL: https://github.com/apache/hugegraph/pull/3376#discussion_r4332940367


##########
hugegraph-pd/hg-pd-core/src/main/java/org/apache/hugegraph/pd/raft/RaftReflectionUtil.java:
##########
@@ -28,6 +29,39 @@
 @Slf4j
 public class RaftReflectionUtil {
 
+    /**
+     * The last index of the node's raft log, read from its log manager; 
Long.MAX_VALUE when
+     * it cannot be read, which the caller treats as "unknown"
+     */
+    public static long getLastLogIndex(Node node) {

Review Comment:
   Fixed in 1d9dae54f. `RaftReflectionUtil.getLastLogIndex(Node)` is removed; 
`RaftEngine` keeps reading the log manager once with `getLogManager` and takes 
the last index from it. One correction to the evidence: 
`RaftReflectionUtilTest.testLogManagerIsReadFromTheJraftNode` did call it, so 
the test now asserts through `getLogManager(node).getLastLogIndex()` and 
`getLogManager(null)` instead.
   



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to