scipio-aemilianus opened a new pull request, #654:
URL: https://github.com/apache/ratis/pull/654

   ## What changes were proposed in this pull request?
   1. Fix snapshot multiple-chunk bug. Currently, when leader install a 
snapshot(multiple chunks) to a newly joined follower, leader will send multiple 
InstallSnapshot RPCs. However, each RPC will create a tmp dir with Random UUID, 
place the chunk in this tmp dir, and **only renames the last tmp dir" to sm 
dir. In this PR, I propose to create tmp dir using request.uuid(), which 
remains unchanged among multiple RPCs.
   
   2. Fix Grpc Stream errors. Currently In grpc.proto, InstallSnapshot is 
declaimed as client-end streaming rpc, but it is actual bi-directional 
streaming rpc. In this PR, I addded `stream` to InstallSnapshot proto so that 
it becomes bi-directional.
   
   3. Support snapshot file hierarchy. Currently all files of a snapshot will 
be placed in statemachine dir and file hierarchy is flattened. In this PR, I 
name each file using its original filename (which contains hierarchy 
information).
   
   ## What is the link to the Apache JIRA
   https://issues.apache.org/jira/browse/RATIS-1587
   
   ## How was this patch tested?
   1. Unit Tests. It passed all unit tests in my machine (MacOS 12.13)
   2. Manual Test. I packaged this version of ratis and tested its snapshot 
functionality in our project Apache IoTDB, and everything is working as expected
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to