[ 
https://issues.apache.org/jira/browse/RATIS-498?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16803556#comment-16803556
 ] 

Hanisha Koneru edited comment on RATIS-498 at 3/28/19 3:21 AM:
---------------------------------------------------------------

Thank you [~szetszwo] for the review.
{quote}When a server is installing snapshot, how should it resply appendEntries 
requests? It seems the server should reject any appendEntries requests until 
installSnapshot completes.
For the example after #8, when N2 sends appendEntries, N3 should ignore the 
request and reply (AppendEntriesReplyProto) the nextIndex 100 (since it has 
installed snapshot 100). Then, it would work.
{quote}
Agree. Updated the patch to check if snapshot installation is going on in 
AppendEntries. Also checking that the first append entry index is greater than 
the latest snapshot index.

{quote}Also, when a leader requests notifyInstallSnapshot at index n, the 
follower could install any snapshots with index >= n. The follower should 
install the latest available snapshot. After the installation has completed, 
the follower reply (either notifyInstallSnapshot or appendEntries) with the new 
index.
{quote}
Yes, we do return the installed snapshot index and not the index n which was 
notified to the follower. This is returned as "snapshotIndex" in 
InstallSnapshotReplyProto.


was (Author: hanishakoneru):
{quote}When a server is installing snapshot, how should it resply appendEntries 
requests? It seems the server should reject any appendEntries requests until 
installSnapshot completes.
For the example after #8, when N2 sends appendEntries, N3 should ignore the 
request and reply (AppendEntriesReplyProto) the nextIndex 100 (since it has 
installed snapshot 100). Then, it would work.
{quote}
Agree. Updated the patch to check if snapshot installation is going on in 
AppendEntries. Also checking that the first append entry index is greater than 
the latest snapshot index.

{quote}Also, when a leader requests notifyInstallSnapshot at index n, the 
follower could install any snapshots with index >= n. The follower should 
install the latest available snapshot. After the installation has completed, 
the follower reply (either notifyInstallSnapshot or appendEntries) with the new 
index.
{quote}
Yes, we do return the installed snapshot index and not the index n which was 
notified to the follower. This is returned as "snapshotIndex" in 
InstallSnapshotReplyProto.

> Notify Follower to Install Snapshot through state machine
> ---------------------------------------------------------
>
>                 Key: RATIS-498
>                 URL: https://issues.apache.org/jira/browse/RATIS-498
>             Project: Ratis
>          Issue Type: New Feature
>          Components: server
>            Reporter: Hanisha Koneru
>            Assignee: Hanisha Koneru
>            Priority: Major
>         Attachments: RATIS-498.000.patch, RATIS-498.001.patch, 
> RATIS-498.002.patch, RATIS-498.003.patch, RATIS-498.004.patch, 
> RATIS-498.005.patch, RATIS-498.006.patch
>
>
> When a lagging Follower wants to catch up with the Leader, and the Leader 
> only has logs with start index greater than the Followers's last log index, 
> then the leader sends an InstallSnapshotRequest to the the Follower. 
> The aim of this Jira is to allow State Machine to decouple snapshot 
> installation from the Ratis server. When Leader does not have the logs to get 
> the Follower up to speed, it should notify the Follower to install a snapshot 
> (if install snapshot through Log Appender is disabled). The Follower in turn 
> notifies its state machine that a snapshot is required to catch up with the 
> leader.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to