Class 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 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, 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:
        QueryController.getIndexQueryResults(Collection)
    • Constructor Detail

      • QueryContext

        public QueryContext​(ReadCommand readCommand,
                            long executionQuotaMs)
    • Method Detail

      • totalQueryTimeNs

        public long totalQueryTimeNs()
      • checkpoint

        public void checkpoint()