phoenix-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Geoffrey Jacoby (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (PHOENIX-5266) Client can only write on Index Table and skip data table if failure happens because of region split/move etc
Date Thu, 02 May 2019 23:24:00 GMT

    [ https://issues.apache.org/jira/browse/PHOENIX-5266?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16832078#comment-16832078
] 

Geoffrey Jacoby commented on PHOENIX-5266:
------------------------------------------

Is this just an issue for the 4.14 client, or would future versions (such as 4.15/5.1 be affected
as well)?

If it applies in the 4.15 world, would PHOENIX-5156 (which ensures that the client never sees
a row that hasn't been written to by both data table and index) solve the problem?

> Client can only write on Index Table and skip data table if failure happens because of
region split/move etc
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: PHOENIX-5266
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-5266
>             Project: Phoenix
>          Issue Type: Bug
>    Affects Versions: 4.14.1, 4.14.2
>            Reporter: Mihir Monani
>            Assignee: Mihir Monani
>            Priority: Blocker
>             Fix For: 4.14.2
>
>
> With Phoenix 4.14.1 client, There is a scenario where client would skip data table write
but do successful index table write. In this case, we should treat it as Data loss scenario.
>  
> Relevant code path :-
> [https://github.com/apache/phoenix/blob/4.x-HBase-1.3/phoenix-core/src/main/java/org/apache/phoenix/execute/MutationState.java#L994-L1043]
> [https://github.com/apache/phoenix/blob/4.x-HBase-1.3/phoenix-core/src/main/java/org/apache/phoenix/execute/MutationState.java#L1089-L1109]
>  
> Here is what happens :-
>  * Consider below assumptions for scenario :- 
>  ** max no row in single batch = 100
>  ** max size of batch = 2 MB
>  * When client faces SQLException Code 1121, it sets variable shouldRetryIndexedMutation=true.
>  * In scenarios where client sends batch of 100 rows only as per configuration, but batch
size is >2 MB, MutationState.java#991 will split this 100 row batch into multiple smaller
batches which are <2MB.
>  ** MutationState.java#991 :- [https://github.com/apache/phoenix/blob/4.x-HBase-1.3/phoenix-core/src/main/java/org/apache/phoenix/execute/MutationState.java#L991]
>  * Suppose there are 5 batches of 20 rows but client faces 1121 SQLExceptionCode on 2nd
batch , then it will set shouldRetryIndexedMutation=true and it will retry all 5 batches again
with only Index updates. This will results in rows missing from Data table.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message