You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ratis.apache.org by "Tsz-wo Sze (Jira)" <ji...@apache.org> on 2022/06/08 04:42:00 UTC
[jira] [Resolved] (RATIS-1587) InstallSnapshot fails when snapshot has multiple chunks
[ https://issues.apache.org/jira/browse/RATIS-1587?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tsz-wo Sze resolved RATIS-1587.
-------------------------------
Fix Version/s: 3.0.0
Resolution: Fixed
The pull request is now merged. Thanks, [~William Song]!
> InstallSnapshot fails when snapshot has multiple chunks
> -------------------------------------------------------
>
> Key: RATIS-1587
> URL: https://issues.apache.org/jira/browse/RATIS-1587
> Project: Ratis
> Issue Type: Bug
> Components: server
> Affects Versions: 2.3.0
> Reporter: Song Ziyang
> Priority: Major
> Fix For: 3.0.0
>
> Attachments: image-2022-05-31-08-56-35-373.png, image-2022-05-31-08-58-44-717.png, image-2022-05-31-09-00-41-286.png, image-2022-06-03-16-27-17-877.png, log.log
>
> Time Spent: 2h 40m
> Remaining Estimate: 0h
>
> *Bug Description*
> Currently, when follower install snapshot from leader, leader will divide snapshot files into a sequence of fixed size chunks (16MB) and send each through rpc.
> !image-2022-05-31-08-56-35-373.png!
> only the last rpc request in the sequence is tagged with 'Done'.
> !image-2022-05-31-08-58-44-717.png!
> However, when follower handles these sequence of rpcs, it will create *a random temp dir for each rpc request, store the chunk in, and only move the last chunk from tmp dir to sm dir.*
> *!image-2022-05-31-09-00-41-286.png!*
> Thus, when snapshot contains multiple files or a single file larger than 16MB, InstallSnapshot will fail because only last chunk is stored in the /sm dir and others are remained in many tmp dirs.
>
> *How To Fix*
> Instead of use random uuid to name tmp dir every time, it is possible to use the *request-uuid* to name the tmp dir. request-uuid is generated by leader once and is shared among the sequence of requests.
>
--
This message was sent by Atlassian Jira
(v8.20.7#820007)