Skip to content

Commit ca81a21

Browse files
committed
Revert "RATIS-2278. Follower Fails to Append Entries Due to Index Validation in NavigableIndices (#1247)"
This reverts commit f5e9935.
1 parent f5e9935 commit ca81a21

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

ratis-server/src/main/java/org/apache/ratis/server/impl/ServerImplUtils.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,7 @@ synchronized void append(List<ConsecutiveIndices> entriesTermIndices) {
141141
// validate startIndex
142142
final Map.Entry<Long, ConsecutiveIndices> lastEntry = map.lastEntry();
143143
if (lastEntry != null) {
144-
final long nextIndex = lastEntry.getValue().getNextIndex();
145-
Preconditions.assertTrue(indices.startIndex >= nextIndex,
146-
() -> "startIndex = " + indices.startIndex + " < nextIndex = " + nextIndex);
144+
Preconditions.assertSame(lastEntry.getValue().getNextIndex(), indices.startIndex, "startIndex");
147145
}
148146
map.put(indices.startIndex, indices);
149147
}

0 commit comments

Comments
 (0)