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

SASI: calculatePrimary() always returns null

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Low
    • Resolution: Fixed
    • 3.11.0
    • Feature/SASI
    • None
    • Low

    Description

      While investigating performance issues with SASI (https://github.com/criteo/biggraphite/issues/174 if you want to know more) I ended finding calculatePrimary() in QueryController.java which apparently should return the "primary index".

      It lacks documentation, and I'm unsure what the "primary index" should be, but apparently this function never returns one because primaryIndexes.size() is always 0.

      https://github.com/apache/cassandra/blob/81f6c784ce967fadb6ed7f58de1328e713eaf53c/src/java/org/apache/cassandra/index/sasi/plan/QueryController.java#L237

      I'm unsure if the proper fix is checking if the collection is empty or reversing the operator (selecting the index with higher cardinality versus the one with lower cardinality).

      Attachments

        Activity

          People

            iksaif Corentin Chary
            iksaif Corentin Chary
            Corentin Chary
            Alex Petrov
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: