aweisberg commented on code in PR #4508:
URL: https://github.com/apache/cassandra/pull/4508#discussion_r2632066613
##########
src/java/org/apache/cassandra/db/AbstractMutationVerbHandler.java:
##########
@@ -51,7 +53,15 @@ public abstract class AbstractMutationVerbHandler<T extends
IMutation> implement
public void doVerb(Message<T> message) throws IOException
{
- processMessage(message, message.respondTo());
+ try
+ {
+ processMessage(message, message.respondTo());
+ }
+ catch (IllegalReplicationTypeException e)
+ {
+ // retry, write may be recoverable if TCM is behind locally
+ doVerb(message);
Review Comment:
It's really unusual to impossible that you have this scenario just because
of the time scales involved. This all happens while a single thread is checking
and seeing epoch 1, immediately entering Keyspace's write op order and checking
and seeing epoch 2, and then unwinding the stack to the verb handler. This
entire thing takes single digit milliseconds. It's just not worth the code to
be able to respond to the coordinator slightly faster.
I think it's really better to just throw CoordinatorBehindException and let
the coordinator retry.
--
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]