mirror of https://github.com/apache/cassandra
Merge branch 'cassandra-3.0' into cassandra-3.11
This commit is contained in:
commit
02e9846f1a
|
|
@ -308,19 +308,6 @@ public abstract class ReadCommand extends MonitorableImpl implements ReadQuery
|
|||
return index;
|
||||
}
|
||||
|
||||
/**
|
||||
* Index instance chosen for this query. Can be null.
|
||||
*
|
||||
* @return Index instance chosen for this query. Can be null.
|
||||
*/
|
||||
@Nullable
|
||||
public Index index()
|
||||
{
|
||||
return null == index
|
||||
? null
|
||||
: Keyspace.openAndGetStore(metadata).indexManager.getIndex(index);
|
||||
}
|
||||
|
||||
/**
|
||||
* The clustering index filter this command to use for the provided key.
|
||||
* <p>
|
||||
|
|
|
|||
|
|
@ -115,7 +115,7 @@ public class SecondaryIndexTest
|
|||
.filterOn("birthdate", Operator.EQ, 1L)
|
||||
.build();
|
||||
|
||||
Index.Searcher searcher = rc.index().searcherFor(rc);
|
||||
Index.Searcher searcher = rc.getIndex(cfs).searcherFor(rc);
|
||||
try (ReadExecutionController executionController = rc.executionController();
|
||||
UnfilteredPartitionIterator pi = searcher.search(executionController))
|
||||
{
|
||||
|
|
@ -202,7 +202,7 @@ public class SecondaryIndexTest
|
|||
|
||||
// verify that it's not being indexed under any other value either
|
||||
ReadCommand rc = Util.cmd(cfs).build();
|
||||
assertNull(rc.index());
|
||||
assertNull(rc.getIndex(cfs));
|
||||
|
||||
// resurrect w/ a newer timestamp
|
||||
new RowUpdateBuilder(cfs.metadata, 2, "k1").clustering("c").add("birthdate", 1L).build().apply();;
|
||||
|
|
@ -220,13 +220,13 @@ public class SecondaryIndexTest
|
|||
// todo - checking the # of index searchers for the command is probably not the best thing to test here
|
||||
RowUpdateBuilder.deleteRow(cfs.metadata, 3, "k1", "c").applyUnsafe();
|
||||
rc = Util.cmd(cfs).build();
|
||||
assertNull(rc.index());
|
||||
assertNull(rc.getIndex(cfs));
|
||||
|
||||
// make sure obsolete mutations don't generate an index entry
|
||||
// todo - checking the # of index searchers for the command is probably not the best thing to test here
|
||||
new RowUpdateBuilder(cfs.metadata, 3, "k1").clustering("c").add("birthdate", 1L).build().apply();;
|
||||
rc = Util.cmd(cfs).build();
|
||||
assertNull(rc.index());
|
||||
assertNull(rc.getIndex(cfs));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
@ -523,7 +523,7 @@ public class SecondaryIndexTest
|
|||
ColumnDefinition cdef = cfs.metadata.getColumnDefinition(col);
|
||||
|
||||
ReadCommand rc = Util.cmd(cfs).filterOn(cdef.name.toString(), Operator.EQ, ((AbstractType) cdef.cellValueType()).decompose(val)).build();
|
||||
Index.Searcher searcher = rc.index().searcherFor(rc);
|
||||
Index.Searcher searcher = rc.getIndex(cfs).searcherFor(rc);
|
||||
if (count != 0)
|
||||
assertNotNull(searcher);
|
||||
|
||||
|
|
|
|||
|
|
@ -595,7 +595,7 @@ public class SSTableReaderTest
|
|||
.columns("birthdate")
|
||||
.filterOn("birthdate", Operator.EQ, 1L)
|
||||
.build();
|
||||
Index.Searcher searcher = rc.index().searcherFor(rc);
|
||||
Index.Searcher searcher = rc.getIndex(indexedCFS).searcherFor(rc);
|
||||
assertNotNull(searcher);
|
||||
try (ReadExecutionController executionController = rc.executionController())
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue