Skip to content

Commit 345641f

Browse files
authored
RATIS-2240. updatePurgeIndex doesn't need to hold RaftLogBase.writeLock (#1214)
1 parent 8353a01 commit 345641f

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

ratis-server/src/main/java/org/apache/ratis/server/raftlog/RaftLogBase.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -144,10 +144,8 @@ public boolean updateCommitIndex(long majorityIndex, long currentTerm, boolean i
144144
}
145145

146146
protected void updatePurgeIndex(Long purged) {
147-
try (AutoCloseableLock writeLock = writeLock()) {
148-
if (purged != null) {
149-
purgeIndex.updateToMax(purged, infoIndexChange);
150-
}
147+
if (purged != null) {
148+
purgeIndex.updateToMax(purged, infoIndexChange);
151149
}
152150
}
153151

0 commit comments

Comments
 (0)