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

Full row index write at the last write phase for mutable global indexes

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.0.0, 4.15.0
    • Fix Version/s: 4.15.0, 5.1.0
    • Component/s: None
    • Labels:
      None

      Description

      In the original design for consistent indexes, we do three phase write. In the first phase, we write full index rows with unverified status, then we write data table rows, and finally we overwrite the index row status on the rows written at the first phase and set it to unverified.

      Instead of writing full index row in the first phase, we can do full index row write at the last phase. So, in the first phase, we can just write unverified status for the index row. In the last row, we can do full row index write at the last phase.

      This change does not impact the correctness of the design but improves overall design in terms of efficiency. In the presence of concurrent writes, we skip the last write phase. These writes leave the index writes in unverified status. Similarly, if the first or second phase write fails, we do not proceed with the third phase. 

      Since with this change, we will be writing only the empty column with the unverified status value (i.e., 2) for index tables in these failure cases, the storage usage will be improved as we will write less index data. This change also opens up the solution domain for some problems, e.g., handling replication lag issues (please see PHOENIX-5527).

        Attachments

        1. PHOENIX-5539.master.001.patch
          8 kB
          Kadir OZDEMIR
        2. PHOENIX-5539.master.002.patch
          12 kB
          Kadir OZDEMIR
        3. PHOENIX-5539.master.003.patch
          12 kB
          Kadir OZDEMIR
        4. PHOENIX-5539.master.004.patch
          12 kB
          Kadir OZDEMIR

          Issue Links

            Activity

              People

              • Assignee:
                kozdemir Kadir OZDEMIR
                Reporter:
                kozdemir Kadir OZDEMIR
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 2h 40m
                  2h 40m