Class QueryContext

java.lang.Object
org.apache.cassandra.index.sai.QueryContext

@NotThreadSafe public class QueryContext extends 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 Details

    • 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, and false otherwise. When this is false, FilterTree can ignore the coordinator suggestion to downgrade to non-strict filtering, potentially reducing the number of false positives.
      See Also:
  • Constructor Details

    • QueryContext

      public QueryContext(ReadCommand readCommand, long executionQuotaMs)
  • Method Details

    • totalQueryTimeNs

      public long totalQueryTimeNs()
    • checkpoint

      public void checkpoint()
    • limit

      public int limit()