aweisberg commented on code in PR #3777:
URL: https://github.com/apache/cassandra/pull/3777#discussion_r1915411304
##########
src/java/org/apache/cassandra/service/accord/AccordService.java:
##########
@@ -768,7 +775,17 @@ public TopologyManager topology()
public @Nonnull TxnResult coordinate(long minEpoch, @Nonnull Txn txn,
@Nonnull ConsistencyLevel consistencyLevel, @Nonnull Dispatcher.RequestTime
requestTime)
{
AsyncTxnResult asyncTxnResult = coordinateAsync(minEpoch, txn,
consistencyLevel, requestTime);
- return getTxnResult(asyncTxnResult, txn.isWrite(), consistencyLevel,
requestTime);
+ try
+ {
+ return getTxnResult(asyncTxnResult);
+ }
+ catch (TopologyMismatch e)
+ {
+ // For now assuming topology mismatch is caused by a race
misrouting
Review Comment:
This was particularly painful in that the Accord txn didn't get to the point
where it runs the code that would return the retry different system error. I
think the disconnect is the coordinator in C* could have adopted the new epoch,
but Accord has not and so the error you get is `TopologyMismatch`.
If you have created the transaction then the coordinator has already decided
the table exists at least once and will loop again and get the cluster metadata
and then find the table doesn't exist attempting to route it because
`getTableMetadata` will throw IRE.
So I think this generally gets handled correctly in loops around trying to
route operations between Accord and non-Accord.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]