[
https://issues.apache.org/jira/browse/RATIS-759?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17030216#comment-17030216
]
Tsz-wo Sze commented on RATIS-759:
----------------------------------
> 1. In LeaderState#stop - We should fail the streamed requests.
There are no requests to fail since the async stream requests were already
replied. It is a good idea to clear the map in stop().
> 2. I think leader change might be an issue. If a request has streamed into
> 100 messages and 50 of them succeeded when s1 was the leader. And now leader
> changes to s2, the 50 succeeded stream requests will not be retried and s2
> will not have them?
Currently, stream requests cannot be failed over to a new leader. This API is
to break down a large request to multiple smaller stream requests.
If failover is required, the application should implement it using async
requests, see the FileStore example.
> Support stream APIs to send large messages
> ------------------------------------------
>
> Key: RATIS-759
> URL: https://issues.apache.org/jira/browse/RATIS-759
> Project: Ratis
> Issue Type: New Feature
> Components: client, server
> Reporter: Tsz-wo Sze
> Assignee: Tsz-wo Sze
> Priority: Major
> Attachments: r759_20200115.patch, r759_20200123.patch
>
>
> It is inefficient to send a large message using
> send(Message)/sendAsync(Message) in RaftClient. We already have
> RaftOutputStream implemented with sendAsync(..). We propose adding the
> following new APIs
> {code}
> /** Create a stream to send a large message. */
> MessageOutputStream stream();
> /** Send the given message using a stream. */
> CompletableFuture<RaftClientReply> streamAsync(Message message);
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)