[ 
https://issues.apache.org/jira/browse/RATIS-2134?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chung En Lee updated RATIS-2134:
--------------------------------
    Description: 
Now, RaftLog appends a metadata entry with the lastCommitIndex and checks 
whether the entry at the lastCommitIndex is neither a metadata entry nor an 
entry with a smaller commit index.

However, RaftLog doesn't always log metadata entries in order. Sometimes, it 
misses some commit indexes. For example:

STATEMACHINELOGENTRY(1, 1)

STATEMACHINELOGENTRY(1, 2)
METADATAENTRY(commitIndex: 1)

A {{METADATAENTRY is lost.}}
{{The lastCommitIndex in the METADATAENTRY}} and  is a metadata entry, RaftLog 
won't append it.

  was:
Now, RaftLog appends a metadata entry with the lastCommitIndex and checks 
whether the entry at the lastCommitIndex is neither a metadata entry nor an 
entry with a smaller commit index.

However, RaftLog doesn't always log metadata entries in order. Sometimes, it 
misses some commit indexes. For example:


STATEMACHINELOGENTRY(1, 1)

STATEMACHINELOGENTRY(1, 2)
METADATAENTRY(commitIndex: 1)
If a {{METADATAENTRY}} is missed and the lastCommitIndex is a metadata entry, 
RaftLog won't append it.


> `logMetadata` could miss appending the `metadataEntry` with the 
> lastCommitIndex
> -------------------------------------------------------------------------------
>
>                 Key: RATIS-2134
>                 URL: https://issues.apache.org/jira/browse/RATIS-2134
>             Project: Ratis
>          Issue Type: Bug
>            Reporter: Chung En Lee
>            Assignee: Chung En Lee
>            Priority: Major
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> Now, RaftLog appends a metadata entry with the lastCommitIndex and checks 
> whether the entry at the lastCommitIndex is neither a metadata entry nor an 
> entry with a smaller commit index.
> However, RaftLog doesn't always log metadata entries in order. Sometimes, it 
> misses some commit indexes. For example:
> STATEMACHINELOGENTRY(1, 1)
> STATEMACHINELOGENTRY(1, 2)
> METADATAENTRY(commitIndex: 1)
> A {{METADATAENTRY is lost.}}
> {{The lastCommitIndex in the METADATAENTRY}} and  is a metadata entry, 
> RaftLog won't append it.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to