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

sankalp kohli commented on CASSANDRA-6246:
------------------------------------------

Regarding reviewing the patch. I have some cleanups/suggestions to the code. I 
am yet to see the whole code. Also I won't note down the things which still 
need to be taken care of or coded.
1) In the DependencyManger, we might want to keep the last executed instance 
otherwise we won't know if the next one depends on the previous one or we have 
missed any in between. 
2) You might want to create java packages and move files there. For example in 
repair code, org.apache.cassandra.repair.messages where we keep all the Request 
Responses. We can do the same for verb handler, etc. 
3) We should add the new verbs to DatabaseDescriptor.getTimout(). Otherwise 
they will use the default timeout. I fixed this for current paxos 
implementation in CASSANDRA-7752
4) PreacceptResponse.failure can also accept missingInstances in the 
constructor. You can make it final and not volatile. 
5) ExecutionSorter.getOrder(). Here if condition uncommitted.size() == 0 is 
always true. Also loadedScc is empty as we don't insert into it. 
6) In ExecuteTask.run(), Instance toExecute = state.loadInstance(toExecuteId); 
should be within the try as we are holding a lock. 
7) EpaxosState.commitCallbacks could be a multi map. 
8) In Instance.java, successors, noop and fastPathPossible are not used. We can 
also get rid of Instance.applyRemote() method.
9) PreacceptCallback.ballot need not be an instance variable as we set 
completed=true after we set it.  
10) PreacceptResponse.missingInstance is not required as it can be calculated 
on the leader in the PreacceptCallback. 
11) EpaxosState.accept(). We can filter out the skipPlaceholderPredicate when 
we calculated missingInstances in PreacceptCallback.getAcceptDecision()
12) PreacceptCallback.getAcceptDecision() We don't need to calculate missingIds 
if accept is going to be false in AcceptDecision. 
13) ParticipantInfo.remoteEndpoints. Here we are not doing any isAlive check 
and just sending messages to all remote endpoints. 
14) ParticipantInfo.endpoints will not be required once we remove the 
Epaxos.getSuccessors()
15) Accept is send to live local endpoints and to all remote endpoints. In 
AcceptCallback, I think we should count response from only local endpoints 
16) When we execute the instance in ExecuteTask, what if we crash after 
executing the instance but before recording it. 

> EPaxos
> ------
>
>                 Key: CASSANDRA-6246
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-6246
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Jonathan Ellis
>            Assignee: Blake Eggleston
>            Priority: Minor
>
> One reason we haven't optimized our Paxos implementation with Multi-paxos is 
> that Multi-paxos requires leader election and hence, a period of 
> unavailability when the leader dies.
> EPaxos is a Paxos variant that requires (1) less messages than multi-paxos, 
> (2) is particularly useful across multiple datacenters, and (3) allows any 
> node to act as coordinator: 
> http://sigops.org/sosp/sosp13/papers/p358-moraru.pdf
> However, there is substantial additional complexity involved if we choose to 
> implement it.



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

Reply via email to