[ 
https://issues.apache.org/jira/browse/PHOENIX-5539?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lars Hofhansl updated PHOENIX-5539:
-----------------------------------
    Fix Version/s: 5.1.0
                   4.15.0

> Full row index write at the last write phase for mutable global indexes
> -----------------------------------------------------------------------
>
>                 Key: PHOENIX-5539
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-5539
>             Project: Phoenix
>          Issue Type: Improvement
>    Affects Versions: 5.0.0, 4.15.0
>            Reporter: Kadir OZDEMIR
>            Assignee: Kadir OZDEMIR
>            Priority: Major
>             Fix For: 4.15.0, 5.1.0
>
>         Attachments: PHOENIX-5539.master.001.patch, 
> PHOENIX-5539.master.002.patch, PHOENIX-5539.master.003.patch, 
> PHOENIX-5539.master.004.patch
>
>          Time Spent: 2h 20m
>  Remaining Estimate: 0h
>
> 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).



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to