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

add paging to get_count

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Low
    • Resolution: Fixed
    • 1.0.0
    • Legacy/CQL

    Description

      It is non-intuitive that get_count materializes the entire slice-to-count on the coordinator node (to perform read repair and > CL.ONE consistency). Even experienced users have been known to cause memory problems by requesting large counts.

      The user cannot page the count himself, because you need a start and stop column to do that, and get_count only returns an integer.

      So the best fix is for us to do the paging under the hood, in CassandraServer. Add a limit to the slicepredicate they specify, and page through it.

      We could add a global setting for count_slice_size, and document that counts of more columns than that will have higher latency (because they make multiple calls through StorageProxy for the pages).

      Attachments

        1. ASF.LICENSE.NOT.GRANTED--CASSANDRA-2894.patch
          4 kB
          Byron Clark
        2. 2894-with-test.txt
          5 kB
          Byron Clark
        3. 2894-with-batch-test.txt
          5 kB
          Byron Clark
        4. 2894-formatted.txt
          3 kB
          Jonathan Ellis

        Activity

          People

            byronclark Byron Clark
            jbellis Jonathan Ellis
            Byron Clark
            Jonathan Ellis
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: