[
https://issues.apache.org/jira/browse/RATIS-2084?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17845396#comment-17845396
]
Tsz-wo Sze commented on RATIS-2084:
-----------------------------------
bq. 6. B thoughts the D is a new peer with next-index = 0, tries to send the
snapshot to D. D already had the snapshot, so the IllegalStateException
occurred.
The IllegalStateException seems incorrect. It should response
InstallSnapshotResult.ALREADY_INSTALLED.
> IllegalStateException when install snapshot from leader
> -------------------------------------------------------
>
> Key: RATIS-2084
> URL: https://issues.apache.org/jira/browse/RATIS-2084
> Project: Ratis
> Issue Type: Bug
> Components: gRPC, snapshot
> Affects Versions: 3.0.1
> Reporter: Song Ziyang
> Priority: Major
> Attachments: image-2024-05-10-16-12-25-436.png
>
>
> !image-2024-05-10-16-12-25-436.png|width=888,height=376!
>
> The event sequence that triggered IllegalStateException:
> # Raft Group (A, B, C) with leader A.
> # Client cli adds a new Peer D to the group.
> # Leader A sends snapshot and logs to D, and peer D is successfully
> bootstrapped.
> # The configuration change log (A,B,C,D) is *NOT* committed while B
> timeouts, starts an election, becomes the new leader.
> # Client cli re-send the add-peer-D request to the newly elected leader B.
> # B thoughts the D is a new peer with next-index = 0, tries to send the
> snapshot to D. D already had the snapshot, so the IllegalStateException
> occurred.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)