Uploaded image for project: 'Phoenix'
  1. Phoenix
  2. PHOENIX-6387

Conditional updates on tables with indexes

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 5.0.0, 4.15.0
    • 4.17.0, 5.2.0
    • None
    • None

    Description

      For a row update done by using the UPSERT VALUES statement, the exact values of the columns to be updated are specified within the UPSERT statement. Regardless of whether a given row exists or not, after the update, we know what the content will be for these columns. However, this is not the case when the ON DUPLICATE KEY clause is added the UPSERT VALUES statement. This clause makes the update conditional and the end result is determined based on the conditions stated within the clause and the current state of the row at the time the update is done. Also, this clause makes the UPSERT VALUES statement atomic.

      Conditional updates are supported for the tables without indexes currently. The current design leverages an HBase atomic operation and cannot be expanded to support tables with indexes since the design requires holding (HBase level) row locks while doing index table updates over RPCs. This results in cluster wide deadlocks. This jira is to redesign conditional updates using Phoenix level row locks instead of using HBase level row locks to also support tables with indexes by leveraging the design of PHOENIX-6160 which simplifies the concurrent mutation handling on tables with indexes.

      Attachments

        Activity

          People

            tkhurana Tanuj Khurana
            kozdemir Kadir OZDEMIR
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: