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

Song Ziyang updated RATIS-2242:
-------------------------------
    Description: 
!image-2025-01-18-10-34-56-100.png!

 

When enable {*}both appendLog channel and heartbeat channel{*},

Leader:
 # appendLog will send an AppendEntries RPC with (previous = nextIndex0, 
entries = [e1,e2...]), then update the follower nextIndex to nextIndex1
 # Subsequent heartbeat channel will send AppendEntries RPCs with (previous = 
nextIndex1, entries = empty)

Follower:

Inconsistency reply will be triggered when handling the heartbeats by 
[https://github.com/apache/ratis/blob/8353a017fe6545fbfb74960ecb3a0f4396c478d2/ratis-server/src/main/java/org/apache/ratis/server/impl/RaftServerImpl.java#L1720-1724]
 

 

*Proposed Solution*

In checkInconsistencyReply, maybe we should check if "previous" is contained in 
current state when the entries list is not empty.

  was:!image-2025-01-18-10-34-56-100.png!


> INCONSISTENCY reply warnings rise after 3.1.3 release
> -----------------------------------------------------
>
>                 Key: RATIS-2242
>                 URL: https://issues.apache.org/jira/browse/RATIS-2242
>             Project: Ratis
>          Issue Type: Bug
>          Components: gRPC, server
>    Affects Versions: 3.1.3
>            Reporter: Song Ziyang
>            Assignee: Song Ziyang
>            Priority: Major
>         Attachments: image-2025-01-18-10-34-56-100.png
>
>
> !image-2025-01-18-10-34-56-100.png!
>  
> When enable {*}both appendLog channel and heartbeat channel{*},
> Leader:
>  # appendLog will send an AppendEntries RPC with (previous = nextIndex0, 
> entries = [e1,e2...]), then update the follower nextIndex to nextIndex1
>  # Subsequent heartbeat channel will send AppendEntries RPCs with (previous = 
> nextIndex1, entries = empty)
> Follower:
> Inconsistency reply will be triggered when handling the heartbeats by 
> [https://github.com/apache/ratis/blob/8353a017fe6545fbfb74960ecb3a0f4396c478d2/ratis-server/src/main/java/org/apache/ratis/server/impl/RaftServerImpl.java#L1720-1724]
>  
>  
> *Proposed Solution*
> In checkInconsistencyReply, maybe we should check if "previous" is contained 
> in current state when the entries list is not empty.



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

Reply via email to