RATIS-1895. Replace increaseNextIndex with updateNextIndex in GrpcLogAppender#926
RATIS-1895. Replace increaseNextIndex with updateNextIndex in GrpcLogAppender#926szetszwo merged 1 commit intoapache:masterfrom
Conversation
|
I'm pondering why we should update I checked the example in the issue that introduced this problem, and I feel that the 7th step in the middle might be a typo; it should probably indicate that it was log [5]. As far as I recall, gRPC's streaming interface can guarantee sequential semantics, so there shouldn't be a situation where responses sent later arrive earlier. Therefore, could it be that the example in that issue doesn't exist actually? If the above statement is correct, maybe we can still lower nextIndex as before, only when the snapshot is transferred or some inconsistency is found, and we can leave nextIndex unchanged when we receive a correct response. |
|
@OneSizeFitsQuorum thanks a lot for the reviews!
It's a bit tricky. The log[4] follower received in 7th step is sent by step 3, not by step 6.
I agree that we should not reduce nextIndex, and that's why original pr uses
|
szetszwo
left a comment
There was a problem hiding this comment.
+1 the change looks good.
Thanks for testing 3.0.0 and catching this bug!
@SzyWilliam Thanks a lot for the detailed explanation! Now I understand the process completely. LGTM~ |

When testing for 3.0.0 release, we found unexpected error messages introduced by a recent PR #914.
see https://issues.apache.org/jira/browse/RATIS-1895.