ReadCommandVerbHandler validateTransientStatus class cast exception
authorAriel Weisberg <aweisberg@apple.com>
Thu, 3 Jan 2019 19:12:59 +0000 (14:12 -0500)
committerAriel Weisberg <aweisberg@apple.com>
Mon, 7 Jan 2019 22:24:28 +0000 (17:24 -0500)
Patch by Ariel Weisberg; Reviewed by Alex Petrov for CASSANDRA-14959

src/java/org/apache/cassandra/db/ReadCommandVerbHandler.java

index 2759e78..e39e8a8 100644 (file)
@@ -81,7 +81,7 @@ public class ReadCommandVerbHandler implements IVerbHandler<ReadCommand>
         ReadCommand command = message.payload;
         Token token;
 
-        if (command.isLimitedToOnePartition())
+        if (command instanceof SinglePartitionReadCommand)
             token = ((SinglePartitionReadCommand) command).partitionKey().getToken();
         else
             token = ((PartitionRangeReadCommand) command).dataRange().keyRange().right.getToken();