Skip to content

Commit 6708ab9

Browse files
SzyWilliamOneSizeFitsQuorum
authored andcommitted
RATIS-2240. updatePurgeIndex doesn't need to hold RaftLogBase.writeLock (#1214)
1 parent a84a924 commit 6708ab9

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
@@ -141,10 +141,8 @@ public boolean updateCommitIndex(long majorityIndex, long currentTerm, boolean i
141141
}
142142

143143
protected void updatePurgeIndex(Long purged) {
144-
try (AutoCloseableLock writeLock = writeLock()) {
145-
if (purged != null) {
146-
purgeIndex.updateToMax(purged, infoIndexChange);
147-
}
144+
if (purged != null) {
145+
purgeIndex.updateToMax(purged, infoIndexChange);
148146
}
149147
}
150148

0 commit comments

Comments
 (0)