SzyWilliam opened a new pull request, #877:
URL: https://github.com/apache/ratis/pull/877

   See https://issues.apache.org/jira/browse/RATIS-1837
   The observations refer to issue comments in 
https://github.com/apache/ratis/pull/876.
   
   The cause is that `ByteString::readFrom` will drain out the inputStream and 
reads all data of a stream into memory, as stated in the doc 
https://javadoc.io/doc/com.google.protobuf/protobuf-java/2.5.0/com/google/protobuf/ByteString.html
 
   > Completely reads the given stream's bytes into a ByteString, blocking if 
necessary until all bytes are read through to the end of the stream.
   
   When a snapshot file is of Gigabytes size, this `ByteString::readFrom` takes 
6s to complete and by the time it returns, the follower already starves and 
starts a new election.
   


-- 
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