szetszwo commented on code in PR #1248:
URL: https://github.com/apache/ratis/pull/1248#discussion_r2052609356


##########
ratis-server/src/main/java/org/apache/ratis/server/impl/ServerImplUtils.java:
##########
@@ -138,19 +138,14 @@ synchronized Long getTerm(long index) {
 
     synchronized void append(List<ConsecutiveIndices> entriesTermIndices) {
       for(ConsecutiveIndices indices : entriesTermIndices) {
-        // validate startIndex
-        final Map.Entry<Long, ConsecutiveIndices> lastEntry = map.lastEntry();
-        if (lastEntry != null) {
-          Preconditions.assertSame(lastEntry.getValue().getNextIndex(), 
indices.startIndex, "startIndex");
-        }
         map.put(indices.startIndex, indices);

Review Comment:
   @RkGrit , sure, ignoring the second request sounds good.  Then, we don't 
have to change `removeExisting` -- it should keep doing `assertSame`.  See 
https://issues.apache.org/jira/secure/attachment/13076150/1248_review.patch



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