mirror of https://github.com/apache/cassandra
Don't share slice query filter in SelectStatement
patch by slebresne; reviewed by jbellis for CASSANDRA-4928
This commit is contained in:
parent
41175282de
commit
d564a2f02b
|
|
@ -1,3 +1,6 @@
|
|||
1.2-rc1
|
||||
* Don't share slice query filter in CQL3 SelectStatement (CASSANDRA-4928)
|
||||
|
||||
1.2-beta2
|
||||
* fp rate of 1.0 disables BF entirely; LCS defaults to 1.0 (CASSANDRA-4876)
|
||||
* off-heap bloom filters for row keys (CASSANDRA_4865)
|
||||
|
|
|
|||
|
|
@ -202,7 +202,6 @@ public class SelectStatement implements CQLStatement
|
|||
Collection<ByteBuffer> keys = getKeys(variables);
|
||||
List<ReadCommand> commands = new ArrayList<ReadCommand>(keys.size());
|
||||
|
||||
IDiskAtomFilter filter = makeFilter(variables);
|
||||
// ...a range (slice) of column names
|
||||
if (isColumnRange())
|
||||
{
|
||||
|
|
@ -212,12 +211,17 @@ public class SelectStatement implements CQLStatement
|
|||
for (ByteBuffer key : keys)
|
||||
{
|
||||
QueryProcessor.validateKey(key);
|
||||
commands.add(new SliceFromReadCommand(keyspace(), key, queryPath, (SliceQueryFilter)filter));
|
||||
// Note that we should not share the slice filter amongst the command, 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(new SliceFromReadCommand(keyspace(), key, queryPath, (SliceQueryFilter)makeFilter(variables)));
|
||||
}
|
||||
}
|
||||
// ...of a list of column names
|
||||
else
|
||||
{
|
||||
// ByNames commands can share the filter
|
||||
IDiskAtomFilter filter = makeFilter(variables);
|
||||
for (ByteBuffer key: keys)
|
||||
{
|
||||
QueryProcessor.validateKey(key);
|
||||
|
|
|
|||
Loading…
Reference in New Issue