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

Jeffrey Zhong updated PHOENIX-1112:
-----------------------------------

    Attachment: Phoenix-1112-v3.patch

The v3 patch addressed latest comments from [~giacomotaylor]. 

Below are answers to some of your questions:
{quote}
-                    if (newState != PIndexState.BUILDING && newState != 
PIndexState.DISABLE) {
 +                    if (newState != PIndexState.BUILDING && newState != 
PIndexState.DISABLE &&
 +                        newState != PIndexState.INACTIVE) {
{quote}
To make sure we can transit from "DISABLE" -> "INACTIVE".

{quote}
 If we go this route, we should get rid of the minimal-phoenix-client.jar, as 
this jar will match that one.
{quote}
I agree. The issue on removing minimal-phoenix-client.jar is that we need to 
document this while as you know few people take a look at release doc so we may 
end up answer same question over & over. In addition, the overhead is trivial 
just phoenix-core jar has more contents. We can always create a separate JIRA 
to remove minimal-phoenix-client down the road. 

{quote}
updates coming into a table with a disable index (to make sure no updates are 
lost)
partially updating the index table
partially updating a local index table
{quote}
You asked too much:-). Tests are never more than enough. I've update the test 
including the first two scenarios.
The local index one is easy and just need to change a little bit on existing 
test case as we did in other tests. 

While there is a bug in disabling local index state when failure so I'll create 
a separate JIRA on that. Because we can't construct index table name from hbase 
index table name which is like _LOCAL_IDX_<DATA_TABLE_FULL_NAME> and got 
following error.
{noformat}
2014-07-29 18:24:53,552 WARN  [defaultRpcServer.handler=0,queue=0,port=61926] 
org.apache.phoenix.index.PhoenixIndexFailurePolicy(136): Attempt to disable 
index _LOCAL_IDX_T failed with code = TABLE_NOT_FOUND. Will use default failure 
policy instead.
{noformat}

The last thing I want to mention is that we still throw exception when we 
successfully disable index. This is wrong because index update is done in 
postBatchMutate after WAL sync and we have to roll-forward(meaning commit). 
That's one of reason we have to abort RS.   

> Atomically rebuild index partially when index update fails  
> ------------------------------------------------------------
>
>                 Key: PHOENIX-1112
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-1112
>             Project: Phoenix
>          Issue Type: Sub-task
>            Reporter: Jeffrey Zhong
>            Assignee: Jeffrey Zhong
>         Attachments: Phoenix-1112-v2.patch, Phoenix-1112-v3.patch, 
> Phoenix-1112.patch
>
>
> This is a short-term work around & safe approach. Currently we disable an 
> index when index update failed(still possible bring down the whole cluster). 
> After an index is disable, human needs to be involved to rebuild entire index 
> which maybe not ideal.
> The patch adds the support to automatically rebuild an disable index 
> partially from where it failed. In addition, it removes RS abort during WAL 
> recovery to prevent chain failures because we don't have to.
> To disable automatically rebuilding failed index, add the following 
> configuration into hbase-site.xml:
> {noformat}
> <property>
>    <name>phoenix.index.failure.handling.rebuild</name>
>    <value>false</value>
> </property>
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to