phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hadoop QA (JIRA)" <>
Subject [jira] [Commented] (PHOENIX-4190) Salted local index failure is causing region server to abort
Date Mon, 11 Sep 2017 22:19:00 GMT


Hadoop QA commented on PHOENIX-4190:

{color:red}-1 overall{color}.  Here are the results of testing the latest attachment
  against master branch at commit 7865a59b0bbc4ea5e8ab775b920f5f608115707b.
  ATTACHMENT ID: 12886484

    {color:green}+1 @author{color}.  The patch does not contain any @author tags.

    {color:red}-1 tests included{color}.  The patch doesn't appear to include any new or modified
                        Please justify why no new tests are needed for this patch.
                        Also please list what manual steps were performed to verify this patch.

    {color:green}+1 javac{color}.  The applied patch does not increase the total number of
javac compiler warnings.

    {color:green}+1 release audit{color}.  The applied patch does not increase the total number
of release audit warnings.

    {color:green}+1 lineLengths{color}.  The patch does not introduce lines longer than 100

    {color:green}+1 core tests{color}.  The patch passed unit tests in .

Test results:
Console output:

This message is automatically generated.

> Salted local index failure is causing region server to abort
> ------------------------------------------------------------
>                 Key: PHOENIX-4190
>                 URL:
>             Project: Phoenix
>          Issue Type: Bug
>            Reporter: Samarth Jain
>            Assignee: James Taylor
>             Fix For: 4.12.0
>         Attachments: PHOENIX-4190.patch
> If you run just this case 
> {code}
> { false, true, true, true, false, null}
> {code}
> in MutableIndexFailureIT on the 4.x-HBase-1.2 branch, [~rajeshbabu], you will see the
following NPE in logs:
> {code}
> 2017-09-11 00:27:08,119 WARN  [B.defaultRpcServer.handler=2,queue=0,port=63436] org.apache.phoenix.index.PhoenixIndexFailurePolicy(143):
handleFailure failed
> java.lang.NullPointerException
> 	at org.apache.phoenix.util.SchemaUtil.getTableKeyFromFullName(
> 	at org.apache.phoenix.util.IndexUtil.updateIndexState(
> 	at org.apache.phoenix.index.PhoenixIndexFailurePolicy.handleFailureWithExceptions(
> 	at org.apache.phoenix.index.PhoenixIndexFailurePolicy.handleFailure(
> 	at org.apache.phoenix.hbase.index.write.IndexWriter.writeAndKillYourselfOnFailure(
> 	at org.apache.phoenix.hbase.index.write.IndexWriter.writeAndKillYourselfOnFailure(
> 	at org.apache.phoenix.hbase.index.Indexer.doPostWithExceptions(
> 	at org.apache.phoenix.hbase.index.Indexer.doPost(
> 	at org.apache.phoenix.hbase.index.Indexer.postBatchMutateIndispensably(
> 	at org.apache.hadoop.hbase.regionserver.RegionCoprocessorHost$
> 	at org.apache.hadoop.hbase.regionserver.RegionCoprocessorHost$
> 	at org.apache.hadoop.hbase.regionserver.RegionCoprocessorHost.execOperation(
> 	at org.apache.hadoop.hbase.regionserver.RegionCoprocessorHost.execOperation(
> 	at org.apache.hadoop.hbase.regionserver.RegionCoprocessorHost.postBatchMutateIndispensably(
> 	at org.apache.hadoop.hbase.regionserver.HRegion.doMiniBatchMutation(
> 	at org.apache.hadoop.hbase.regionserver.HRegion.batchMutate(
> 	at org.apache.hadoop.hbase.regionserver.HRegion.batchMutate(
> 	at org.apache.hadoop.hbase.regionserver.RSRpcServices.doBatchOp(
> 	at org.apache.hadoop.hbase.regionserver.RSRpcServices.doNonAtomicRegionMutation(
> 	at org.apache.hadoop.hbase.regionserver.RSRpcServices.multi(
> 	at org.apache.hadoop.hbase.protobuf.generated.ClientProtos$ClientService$2.callBlockingMethod(
> 	at
> 	at
> 	at org.apache.hadoop.hbase.ipc.RpcExecutor.consumerLoop(
> 	at org.apache.hadoop.hbase.ipc.RpcExecutor$
> 	at
> {code}
> This happens only for salted local indexes. If I remove the SALT_BUCKETS from the table
DDL, then the test passes fine. On looking closely at the code, it seems like something is
wrong with the computation of offset and subsequent parsing of the index id from the row key
here (in PhoenixIndexFailurePolicy):
> {code}
> int offset =
>                     regionInfo.getStartKey().length == 0 ? regionInfo.getEndKey().length
>                             : regionInfo.getStartKey().length;
>             byte[] viewId = null;
>             for (Mutation mutation : mutations) {
>                 viewId =
>                         indexMaintainer.getViewIndexIdFromIndexRowKey(
>                                 new ImmutableBytesWritable(mutation.getRow(), offset,
>                                         mutation.getRow().length - offset));
>                 String indexTableName = localIndexNames.get(new ImmutableBytesWritable(viewId));
>                 indexTableNames.add(indexTableName);
>             }
> {code}
> Because of this NPE in PhoenixIndexFailurePolicy, we end up triggering the KillServerOnFailurePolicy
which ends up causing the region server to abort. 
> This region server abort is also the reason why our builds against the 4.x-HBase-1.2
branch are hanging. I also believe once we fix this, we can hopefully reenable back the parameters
which were testing out rebuild of local indexes for the 4.x-HBase-0.98, 4.x-HBase-1.1 and
4.x-HBase-1.2 branches. On the master branch, because local index update is transactional
with data table update, we won' run into such failure scenarios (I think).
> [~jamestaylor] - A bit orthogonal, but it seems like we can do better here. Wouldn't
a better option here would be to let HBase black list the Indexer co-processor in cases of
such bugs? Else, we run the risk of shutting down the entire HBase cluster which is what happened

This message was sent by Atlassian JIRA

View raw message