[jira] [Commented] (RATIS-225) Grpc LogAppender should update next index on heartbeat reply
[ https://issues.apache.org/jira/browse/RATIS-225?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16437540#comment-16437540 ] Tsz Wo Nicholas Sze commented on RATIS-225: --- +1 the 003 patch looks good. > Grpc LogAppender should update next index on heartbeat reply > > > Key: RATIS-225 > URL: https://issues.apache.org/jira/browse/RATIS-225 > Project: Ratis > Issue Type: Improvement >Reporter: Lokesh Jain >Assignee: Lokesh Jain >Priority: Major > Attachments: RATIS-225.003.patch > > > Grpc LogAppender currently does not update next index in heartbeat reply. In > case the previous appendEntry times out the next index may not be updated in > the leader for a long time. Therefore we need to update the next index on a > heartbeat success. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (RATIS-225) Grpc LogAppender should update next index on heartbeat reply
[ https://issues.apache.org/jira/browse/RATIS-225?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16436972#comment-16436972 ] Lokesh Jain commented on RATIS-225: --- The match index is updated in the heartbeat only if previous append entry request was successful in the follower. In such a case the follower appended the entry in its log but only the append entry reply was not on time. > Grpc LogAppender should update next index on heartbeat reply > > > Key: RATIS-225 > URL: https://issues.apache.org/jira/browse/RATIS-225 > Project: Ratis > Issue Type: Improvement >Reporter: Lokesh Jain >Assignee: Lokesh Jain >Priority: Major > Attachments: RATIS-225.002.patch > > > Grpc LogAppender currently does not update next index in heartbeat reply. In > case the previous appendEntry times out the next index may not be updated in > the leader for a long time. Therefore we need to update the next index on a > heartbeat success. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (RATIS-225) Grpc LogAppender should update next index on heartbeat reply
[ https://issues.apache.org/jira/browse/RATIS-225?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16436732#comment-16436732 ] Lokesh Jain commented on RATIS-225: --- [~szetszwo] v2 patch adds a test. GrpcLogAppender can not use LogAppender#onSuccess as the follower next index is updated on GrpcLogAppender#appendLog:147. If I remove it will change the way append entries are sent. > Grpc LogAppender should update next index on heartbeat reply > > > Key: RATIS-225 > URL: https://issues.apache.org/jira/browse/RATIS-225 > Project: Ratis > Issue Type: Improvement >Reporter: Lokesh Jain >Assignee: Lokesh Jain >Priority: Major > Attachments: RATIS-225.002.patch > > > Grpc LogAppender currently does not update next index in heartbeat reply. In > case the previous appendEntry times out the next index may not be updated in > the leader for a long time. Therefore we need to update the next index on a > heartbeat success. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (RATIS-225) Grpc LogAppender should update next index on heartbeat reply
[ https://issues.apache.org/jira/browse/RATIS-225?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16435367#comment-16435367 ] Lokesh Jain commented on RATIS-225: --- This can happen during normal operation as well. Suppose the appendEntryRequest1 was sent. It has some 100 entries whose state machine data needs to be written. Now the reply for this request would be sent after all 100 entries have been written to the state machine. Now if another appendEntryRequest2 is sent with just one entry. This request might receive a reply earlier as its stateMachineData is less comparatively. This would happen after I changed pendingRequests from queue to a map in RATIS-217. Yes, we should update match index in strict order. > Grpc LogAppender should update next index on heartbeat reply > > > Key: RATIS-225 > URL: https://issues.apache.org/jira/browse/RATIS-225 > Project: Ratis > Issue Type: Improvement >Reporter: Lokesh Jain >Assignee: Lokesh Jain >Priority: Major > Attachments: RATIS-225.001.patch > > > Grpc LogAppender currently does not update next index in heartbeat reply. In > case the previous appendEntry times out the next index may not be updated in > the leader for a long time. Therefore we need to update the next index on a > heartbeat success. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (RATIS-225) Grpc LogAppender should update next index on heartbeat reply
[ https://issues.apache.org/jira/browse/RATIS-225?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16435316#comment-16435316 ] Tsz Wo Nicholas Sze commented on RATIS-225: --- > ... This happens because append entry reply might be out of order ... When will this happen? Due to timeout? When the replies are out of order, should we not updating matchIndex (since the logs are not really matched)? > Grpc LogAppender should update next index on heartbeat reply > > > Key: RATIS-225 > URL: https://issues.apache.org/jira/browse/RATIS-225 > Project: Ratis > Issue Type: Improvement >Reporter: Lokesh Jain >Assignee: Lokesh Jain >Priority: Major > Attachments: RATIS-225.001.patch > > > Grpc LogAppender currently does not update next index in heartbeat reply. In > case the previous appendEntry times out the next index may not be updated in > the leader for a long time. Therefore we need to update the next index on a > heartbeat success. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (RATIS-225) Grpc LogAppender should update next index on heartbeat reply
[ https://issues.apache.org/jira/browse/RATIS-225?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16435239#comment-16435239 ] Lokesh Jain commented on RATIS-225: --- LogAppender#onSuccess might throw IllegalStateException in case of GrpcLogAppender. This happens because append entry reply might be out of order. The reply is sent when the state machine data is written in the follower. > Grpc LogAppender should update next index on heartbeat reply > > > Key: RATIS-225 > URL: https://issues.apache.org/jira/browse/RATIS-225 > Project: Ratis > Issue Type: Improvement >Reporter: Lokesh Jain >Assignee: Lokesh Jain >Priority: Major > Attachments: RATIS-225.001.patch > > > Grpc LogAppender currently does not update next index in heartbeat reply. In > case the previous appendEntry times out the next index may not be updated in > the leader for a long time. Therefore we need to update the next index on a > heartbeat success. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (RATIS-225) Grpc LogAppender should update next index on heartbeat reply
[ https://issues.apache.org/jira/browse/RATIS-225?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16430357#comment-16430357 ] Lokesh Jain commented on RATIS-225: --- The v1 patch modifies the test for appendEntryTimeout to test the scenario. Without the update on heartbeat the modified test fails with IllegalStateException. This happens because the follower next index is not updated on leader as we have blocked the append entry replies in the test. After the retry cache timeout the client request is accepted again by the leader which leads to IllegalStateException. This scenario is avoided if the leader is updated on every heartbeat. > Grpc LogAppender should update next index on heartbeat reply > > > Key: RATIS-225 > URL: https://issues.apache.org/jira/browse/RATIS-225 > Project: Ratis > Issue Type: Improvement >Reporter: Lokesh Jain >Assignee: Lokesh Jain >Priority: Major > Attachments: RATIS-225.001.patch > > > Grpc LogAppender currently does not update next index in heartbeat reply. In > case the previous appendEntry times out the next index may not be updated in > the leader for a long time. Therefore we need to update the next index on a > heartbeat success. -- This message was sent by Atlassian JIRA (v7.6.3#76005)