Package org.apache.cassandra.index.sai
Class QueryContext
- java.lang.Object
-
- org.apache.cassandra.index.sai.QueryContext
-
@NotThreadSafe public class QueryContext extends java.lang.Object
Tracks state relevant to the execution of a single query, including metrics and timeout monitoring.Fields here are non-volatile, as they are accessed from a single thread.
-
-
Field Summary
Fields Modifier and Type Field Description long
balancedTreePostingListsHit
long
balancedTreePostingsDecodes
long
balancedTreePostingsSkips
long
balancedTreeSegmentsHit
long
executionQuotaNano
boolean
hasUnrepairedMatches
true
if the local query for this context has matches from Memtable-attached indexes or indexes on unrepaired SSTables, andfalse
otherwise.long
partitionsRead
boolean
queryTimedOut
long
rowsFiltered
long
segmentsHit
long
sstablesHit
long
triePostingsDecodes
long
triePostingsSkips
long
trieSegmentsHit
-
Constructor Summary
Constructors Constructor Description QueryContext(ReadCommand readCommand, long executionQuotaMs)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
checkpoint()
long
totalQueryTimeNs()
VectorQueryContext
vectorContext()
-
-
-
Field Detail
-
executionQuotaNano
public final long executionQuotaNano
-
sstablesHit
public long sstablesHit
-
segmentsHit
public long segmentsHit
-
partitionsRead
public long partitionsRead
-
rowsFiltered
public long rowsFiltered
-
trieSegmentsHit
public long trieSegmentsHit
-
triePostingsSkips
public long triePostingsSkips
-
triePostingsDecodes
public long triePostingsDecodes
-
balancedTreePostingListsHit
public long balancedTreePostingListsHit
-
balancedTreeSegmentsHit
public long balancedTreeSegmentsHit
-
balancedTreePostingsSkips
public long balancedTreePostingsSkips
-
balancedTreePostingsDecodes
public long balancedTreePostingsDecodes
-
queryTimedOut
public boolean queryTimedOut
-
hasUnrepairedMatches
public boolean hasUnrepairedMatches
true
if the local query for this context has matches from Memtable-attached indexes or indexes on unrepaired SSTables, andfalse
otherwise. When this isfalse
,FilterTree
can ignore the coordinator suggestion to downgrade to non-strict filtering, potentially reducing the number of false positives.
-
-
Constructor Detail
-
QueryContext
public QueryContext(ReadCommand readCommand, long executionQuotaMs)
-
-
Method Detail
-
totalQueryTimeNs
public long totalQueryTimeNs()
-
checkpoint
public void checkpoint()
-
vectorContext
public VectorQueryContext vectorContext()
-
-