jmckenzie-dev commented on code in PR #4727:
URL: https://github.com/apache/cassandra/pull/4727#discussion_r3080557861


##########
src/java/org/apache/cassandra/db/ReadCommandVerbHandler.java:
##########
@@ -87,17 +88,28 @@ public void doVerb(Message<ReadCommand> message)
         {
             response = command.createResponse(iterator, 
controller.getRepairedDataInfo());
         }
+        catch (AssertionError t)
+        {
+            throw new AssertionError(String.format("Caught an error while 
trying to process the command: %s", command.toCQLString()), t);
+        }
+        catch (QueryCancelledException e)
+        {
+            logger.debug("Query cancelled (timeout)", e);
+            response = null;
+            assert !command.isCompleted() : "Read marked as completed despite 
being aborted by timeout to table " + command.metadata();

Review Comment:
   We don't all agree on moving to Preconditions from asserts so it's more of a 
"do it in tiny increments as we go" so we don't die on that hill of people 
getting bent out of shape about big changes like that. :)



-- 
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]

Reply via email to