szetszwo commented on code in PR #1612:
URL: https://github.com/apache/ratis/pull/1612#discussion_r4171415310
##########
ratis-server/src/main/java/org/apache/ratis/server/raftlog/RaftLogBase.java:
##########
@@ -153,7 +165,8 @@ protected void updateSnapshotIndexFromStateMachine() {
@Override
public void updateSnapshotIndex(long newSnapshotIndex) {
- try(AutoCloseableLock writeLock = writeLock()) {
+ try(AutoCloseableLock commitLock = writeLock(LockType.COMMIT_INDEX);
+ AutoCloseableLock snapshotLock = writeLock(LockType.SNAPSHOT_INDEX)) {
Review Comment:
@Elia-Renzoni , SNAPSHOT_INDEX is only acquired here together with
COMMIT_INDEX. All the other cases acquire COMMIT_INDEX. So, SNAPSHOT_INDEX
has no effect. Now?
--
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]