Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-4986

Allow finer control of ALLOW FILTERING behavior

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Low
    • Resolution: Later
    • None
    • None
    • None

    Description

      CASSANDRA-4915 added ALLOW FILTERING to warn people when they do potentially inefficient queries. However, as discussed in the former issue it would be interesting to allow controlling that mode more precisely by allowing something like:

      ... ALLOW FILTERING MAX 500
      

      whose behavior would be that the query would be short-circuited if it filters (i.e. read but discard from the ResultSet) more than 500 CQL3 rows.

      There is however 2 details I'm not totally clear on:

      1. what to do exactly when we reach the max filtering allowed. Do we return what we have so far, but then we need to have a way to say in the result set that the query was short-circuited. Or do we just throw an exception TooManyFiltered (simpler but maybe a little bit less useful).
      2. what about deleted records? Should we count them as 'filtered'? Imho the logical thing is to not count them as filtered, since after all we "filter them out" in the normal path (i.e. even when ALLOW FILTERING is not used).

      Attachments

        Activity

          People

            Unassigned Unassigned
            slebresne Sylvain Lebresne
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: