[ 
https://issues.apache.org/jira/browse/CASSANDRA-10198?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14742703#comment-14742703
 ] 

Aleksey Yeschenko commented on CASSANDRA-10198:
-----------------------------------------------

1. If we were to continue using an {{Iterable<Future>}} there, then the Java 8 
way to deal with streams would be to use a collector ({{Collectors.toList()}} 
in this case)
2. However, in Java 8, we should use a {{CompletableFuture}} here, and not an 
{{Iterable}} of {{Future}}, or a single future.
3. We are picking just one destination for hints. Which is fine, I guess. Yet 
we potentially use multiple threads to deliver to the same node, and thus 
disrespect the configured rate limit, which is per-destination. These should be 
serialized.
4. Failure to deliver is completely ignored. We must deliver all hints before 
returning, as this has implications for batchlog-generated hints.
5. Please add some documentation for the method. On the level of {{excise}} 
javadoc at least.

> 3.0 hints should be streamed on decomission
> -------------------------------------------
>
>                 Key: CASSANDRA-10198
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-10198
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Aleksey Yeschenko
>            Assignee: Marcus Eriksson
>             Fix For: 3.0.0 rc1
>
>
> CASSANDRA-6230 added all the necessary pieces in the initial release, but 
> streaming itself didn't make it in time.
> Now that hints are stored in flat files, we cannot just stream hints 
> sstables. Instead we need to handoff hints files.
> Essentially we need to rewrite {{StorageService::streamHints}} to be 
> CASSANDRA-6230 aware.
> {{HintMessage}} and {{HintVerbHandler}} can already handle hints targeted for 
> other nodes (see javadoc for both, it's documented reasonably).
> {{HintsDispatcher}} also takes hostId as an argument, and can stream any 
> hints to any nodes.
> The building blocks are all there - we just need 
> {{StorageService::streamHints}} to pick the optimal candidate for each file 
> and use {{HintsDispatcher}} to stream the files.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to