Ariel Weisberg created CASSANDRA-18276:
------------------------------------------

             Summary: Paxos read throws TimeoutException instead of retrying 
when contending with writes when it could retry
                 Key: CASSANDRA-18276
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-18276
             Project: Cassandra
          Issue Type: Bug
          Components: Feature/Lightweight Transactions
            Reporter: Ariel Weisberg
            Assignee: Ariel Weisberg


[Paxos.read currently copies the code to throw timeout 
exception|https://github.com/apache/cassandra/blob/ece0c4a44c9209dc64240f3f33ca7a57d7548daa/src/java/org/apache/cassandra/service/paxos/Paxos.java#L873]
 if the read had side effects. This doesn’t make much sense because the empty 
proposal doesn’t have a side effect so it should be safe to retry the empty 
proposal instead of throwing timeout immediately.

The impact of this is a little more severe because it’s also [not waiting 
during 
propose|https://github.com/apache/cassandra/blob/ece0c4a44c9209dc64240f3f33ca7a57d7548daa/src/java/org/apache/cassandra/service/paxos/PaxosPropose.java#L166]
 to see if there wouldn’t have been side effects for its empty proposal so it 
will always think there were side effects and timeout immediately if there are 
any refusals.

Of course this only ever happens when it thinks the read might not be 
linearizable because it witnessed some in progress operation during the 
prrepare/promise phase.

This should be pretty easy to fix either by removing the side effect immediate 
timeout code entirely, or at least improved by actually waiting for side 
effects during propose.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to