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

Improve custom 2i performance and abstraction

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Normal
    • Resolution: Fixed
    • 2.1 beta1
    • None

    Description

      With the current implementation, the method update from SecondaryIndexManager forces to insert and delete a cell. That happens because we assume that we need the value of the old cell in order to locate the cell that we are updating in our custom secondary index implementation.

      However, depending on the implementation, a insert and a delete operations could have much worse performance than a simple update. Moreover, if our custom secondary index doesn't use inverted indexes, we don't really need the old cell information and the key information is enough.

      Therefore, a good solution would be to make the update method more abstract. Thus, the update method for PerColumnSecondaryIndex would receive also the old cell information and from that point we could decide if we must carry out the delete+insert operation or just a update operation.

      I attach a patch that implements this solution.

      Attachments

        1. 6640.diff
          4 kB
          Miguel Angel Fernandez Diaz
        2. 6640v2.diff
          4 kB
          Miguel Angel Fernandez Diaz

        Activity

          People

            mafernandez Miguel Angel Fernandez Diaz
            mafernandez Miguel Angel Fernandez Diaz
            Miguel Angel Fernandez Diaz
            Sam Tunnicliffe
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: