From 4c9afde7a8fdf85932d3a86b8c0ee6f1549d6e25 Mon Sep 17 00:00:00 2001 From: Jake Luciani Date: Tue, 1 Jul 2014 13:35:33 -0400 Subject: [PATCH] Clone partition key for ReadCommands to avoid netty corruption patch by jake; reviewed by jason brown for CASSANDRA-7465 --- .../org/apache/cassandra/cql3/statements/SelectStatement.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java b/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java index a4a5553d69..b454ece036 100644 --- a/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java +++ b/src/java/org/apache/cassandra/cql3/statements/SelectStatement.java @@ -345,7 +345,7 @@ public class SelectStatement implements CQLStatement, MeasurableForPreparedCache // We should not share the slice filter amongst the commands (hence the cloneShallow), due to // SliceQueryFilter not being immutable due to its columnCounter used by the lastCounted() method // (this is fairly ugly and we should change that but that's probably not a tiny refactor to do that cleanly) - commands.add(ReadCommand.create(keyspace(), key, columnFamily(), now, filter.cloneShallow())); + commands.add(ReadCommand.create(keyspace(), ByteBufferUtil.clone(key), columnFamily(), now, filter.cloneShallow())); } return commands;