You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "James Taylor (JIRA)" <ji...@apache.org> on 2018/05/31 07:17:00 UTC

[jira] [Updated] (PHOENIX-4760) Prevent data loss for client-side local index maintanence in Omid

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

James Taylor updated PHOENIX-4760:
----------------------------------
    Description: 
To prevent potential data loss if a split occurs while we're sending local index updates from the client for Omid transactions, we should include the end region boundary in the Mutation. We can check if the actual region end boundary match and if not, raise an exception which the client can react to by retrying.

This is not a bug in HBase. This will happen because we are prefix Region start key to the index updates.

Before Split":
===========
Client side Region boundaries : [a, f)
Server side Region boundaries : [a, f)
base table keyvalue : <"cd", "value">
Index table keyvalue : <"a|value", "cd">

After split with split key "c":
=====================
Client side Region boundaries : [a, f)
Server side Region boundaries : First child - [a, c), Second child - [c, f)
base table keyvalue : <"cd", "value"> (it will be written to second child)
Index table keyvalue : <"a|value", "cd"> (since as for the client cache region boundaries are [a,f) we still go with prefix "a" and it will be written to first child)

After split as for the row key it's belongs to first child and that's why HBase allows it's not a problem.

  was:To prevent potential data loss if a split occurs while we're sending local index updates from the client for Omid transactions, we should include the region boundaries in the Mutation. We can check if the actual region boundaries match and if not, raise an exception which the client can react to by retrying.


> Prevent data loss for client-side local index maintanence in Omid
> -----------------------------------------------------------------
>
>                 Key: PHOENIX-4760
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-4760
>             Project: Phoenix
>          Issue Type: Bug
>            Reporter: James Taylor
>            Priority: Major
>
> To prevent potential data loss if a split occurs while we're sending local index updates from the client for Omid transactions, we should include the end region boundary in the Mutation. We can check if the actual region end boundary match and if not, raise an exception which the client can react to by retrying.
> This is not a bug in HBase. This will happen because we are prefix Region start key to the index updates.
> Before Split":
> ===========
> Client side Region boundaries : [a, f)
> Server side Region boundaries : [a, f)
> base table keyvalue : <"cd", "value">
> Index table keyvalue : <"a|value", "cd">
> After split with split key "c":
> =====================
> Client side Region boundaries : [a, f)
> Server side Region boundaries : First child - [a, c), Second child - [c, f)
> base table keyvalue : <"cd", "value"> (it will be written to second child)
> Index table keyvalue : <"a|value", "cd"> (since as for the client cache region boundaries are [a,f) we still go with prefix "a" and it will be written to first child)
> After split as for the row key it's belongs to first child and that's why HBase allows it's not a problem.



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