chungen0126 commented on PR #1130: URL: https://github.com/apache/ratis/pull/1130#issuecomment-2270435667
Done. I also add a check to avoid NullPointerException as below as mentioned in https://github.com/apache/ratis/pull/1130#discussion_r1704381262: ``` private boolean shouldAppendMetadata(long newCommitIndex) { if (newCommitIndex <= 0) { // do not log the first conf entry return false; } final LogEntryProto last = lastMetadataEntry.get(); // do not log entries with a smaller commit index. if (last == null) { return false; } return newCommitIndex > last.getMetadataEntry().getCommitIndex(); } ``` -- 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]
