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

Jitendra Nath Pandey commented on RATIS-352:
--------------------------------------------

The patch looks ok to me. Just want to mention a couple of considerations:
 # Should we flush the metadata entry before updating the watch request?
 ** The patch doesn't do that, and I agree it is ok, because watch requests 
wait for followers to respond, and for majority commit, leader waits for 
applying transaction.
# Does the follower update its commitIndex, only after flushing the commit 
metadata entry?
 ** It seems this is important, so that when leader learns the commitInfo from 
followers, the commitIndex is persisted in followers. This is not obvious from 
this patch, hence the question.

> Persist commit index in Raft log.
> ---------------------------------
>
>                 Key: RATIS-352
>                 URL: https://issues.apache.org/jira/browse/RATIS-352
>             Project: Ratis
>          Issue Type: Improvement
>          Components: server
>            Reporter: Tsz Wo Nicholas Sze
>            Assignee: Tsz Wo Nicholas Sze
>            Priority: Major
>         Attachments: r352_20181106.patch, r352_20181107.patch, 
> r352_20181115.patch, r352_20181117.patch, r352_20181117b.patch, 
> r352_20181118.patch
>
>
> Current the commit index is not persisted in the Raft log.  When a server 
> restarts, it cannot apply its log until it has joined a Raft group.  There is 
> no problem if there is a Raft group.  
> However, a server cannot recover its data when formatting a Raft group is 
> impossible (e.g. a majority of servers are dead).  Ideally, a server can 
> safely apply the log up to the commit index.  The JIRA is to persist the 
> commit index so that such recovery is possible.



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

Reply via email to