follower state machine ignore read operation. (#7989)
This commit is contained in:
parent
2d0a8add41
commit
cc549cbac7
@ -107,6 +107,13 @@ class NacosStateMachine extends StateMachineAdapter {
|
||||
} else {
|
||||
final ByteBuffer data = iter.getData();
|
||||
message = ProtoMessageUtil.parse(data.array());
|
||||
if (message instanceof ReadRequest) {
|
||||
//'iter.done() == null' means current node is follower, ignore read operation
|
||||
applied++;
|
||||
index++;
|
||||
iter.next();
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
LoggerUtils.printIfDebugEnabled(Loggers.RAFT, "receive log : {}", message);
|
||||
|
Loading…
Reference in New Issue
Block a user