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

Jaakko Laine commented on CASSANDRA-558:
----------------------------------------

1) I was thinking of having some helper function 
doTheStuff(WriteResponseHandler responseHandler) and then set the 
responsehandler if it was not null. Don't know if this would be enough, though.

3) It can be local if cluster size is only slightly bigger than replication 
factor: (a) Suppose we have a cluster of four nodes (1, 2, 3 and 4) with 
replication factor 3. (b) Suppose that write is done, for which 1, 2 and 3 are 
responsible for storing replicas. (c) Suppose that this write is directed to 
node 4, and nodes 2 and 3 are down at this time. In this case one write will go 
to node 1, and node 4 will store hinted replicas for 2 and 3. Even if only one 
of these nodes (1, 2 or 3) is down, the hinted replica will go to the local 
node to which write operation was directed. This is because 
getHintedMapForEndpoints fills the list of endpoints with local endpoint in 
case it cannot get enough of unused live endpoints. But as mentioned, this is a 
very rare case, so probably not worth the trouble.

5) I'll test this more in the morning.


> optimize local writes
> ---------------------
>
>                 Key: CASSANDRA-558
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-558
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Jonathan Ellis
>            Assignee: Jonathan Ellis
>            Priority: Minor
>             Fix For: 0.5
>
>         Attachments: 
> 0001-CASSANDRA-558-make-local-insert-skip-MessagingServic.txt, 
> 0002-add-WriteResponseHandler-combining-the-important-parts.txt, 
> 0003-rename.txt, 0004-two-trivial-changes.patch
>
>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to