hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "stack (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-19876) The exception happening in converting pb mutation to hbase.mutation messes up the CellScanner
Date Sat, 10 Feb 2018 18:20:00 GMT

    [ https://issues.apache.org/jira/browse/HBASE-19876?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16359563#comment-16359563

stack commented on HBASE-19876:

Took a look. This is tricky stuff. Thanks for diving in.

This comment is a little confusing:

890	        // TODO doBatchOp has handled the IOE for all non-atomic operations
891	        // Catching IOE here may confuse readers in the future

It is in a catch for an IOE so ... should we remove the catch block this comment is in?

I was trying to see if you could get rid of the cycle looking for Gets in checkAndRowMutate
now it has been added to doBatchOp but couldn't figure it; an optimization for another time

On below, I agree.

1011	        // The atomic ops use the global exception although I feel it is ok to add the
1012	        // to each action.

We need an issue for the below?

184	   * The invalid cells is in rm. The rm should fail but the subsequent mutations should
185	   * Currently, we have no client api to submit the request consisting of condition-rm
and mutation.
186	   * Hence, this test build the request manually.

We need to make it so it is easy to stand up a RegionServer w/o a Master so you don't have
to do the below. This should be easier now...  since HBASE-18846. Let me work on it.... 

218	    ClientProtos.MultiResponse response = rs.getRSRpcServices().multi(controller, request);

Great tests [~chia7712]

This patch is super important stuff.

+1 to commit.

> The exception happening in converting pb mutation to hbase.mutation messes up the CellScanner
> ---------------------------------------------------------------------------------------------
>                 Key: HBASE-19876
>                 URL: https://issues.apache.org/jira/browse/HBASE-19876
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Chia-Ping Tsai
>            Assignee: Chia-Ping Tsai
>            Priority: Critical
>             Fix For: 1.3.2, 1.5.0, 1.2.7, 2.0.0-beta-2, 1.4.2
>         Attachments: HBASE-19876.branch-1.2.v0.patch, HBASE-19876.master.001.patch, HBASE-19876.v0.patch,
HBASE-19876.v1.patch, HBASE-19876.v2.patch, HBASE-19876.v3.patch, HBASE-19876.v3.patch, HBASE-19876.v3.patch,
HBASE-19876.v3.patch, HBASE-19876.v4.patch, HBASE-19876.v5.patch, HBASE-19876.v6.patch
> {code:java}
> 2018-01-27 22:51:43,794 INFO  [hconnection-0x3291b443-shared-pool11-t6] client.AsyncRequestFutureImpl(778):
id=5, table=testQuotaStatusFromMaster3, attempt=6/16 failed=20ops, last exception=org.apache.hadoop.hbase.client.WrongRowIOException:
org.apache.hadoop.hbase.client.WrongRowIOException: The row in xxx doesn't match the original
one aaa
> 	at org.apache.hadoop.hbase.client.Mutation.add(Mutation.java:776)
> 	at org.apache.hadoop.hbase.client.Put.add(Put.java:282)
> 	at org.apache.hadoop.hbase.shaded.protobuf.ProtobufUtil.toPut(ProtobufUtil.java:642)
> 	at org.apache.hadoop.hbase.regionserver.RSRpcServices.doBatchOp(RSRpcServices.java:952)
> 	at org.apache.hadoop.hbase.regionserver.RSRpcServices.doNonAtomicRegionMutation(RSRpcServices.java:896)
> 	at org.apache.hadoop.hbase.regionserver.RSRpcServices.multi(RSRpcServices.java:2591)
> 	at org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos$ClientService$2.callBlockingMethod(ClientProtos.java:41560)
> 	at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:404)
> 	at org.apache.hadoop.hbase.ipc.CallRunner.run(CallRunner.java:130)
> 	at org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:324)
> 	at org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:304){code}
> I noticed this bug when testing the table space quota.
> When rs are converting pb mutation to hbase.mutation, the quota exception or cell exception
may be thrown.
> {code}
> Unable to find source-code formatter for language: rsrpcservices#dobatchop.java. Available
languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy,
haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow,
ruby, scala, sh, sql, swift, visualbasic, xml, yaml      for (ClientProtos.Action action:
mutations) {
>         MutationProto m = action.getMutation();
>         Mutation mutation;
>         if (m.getMutateType() == MutationType.PUT) {
>           mutation = ProtobufUtil.toPut(m, cells);
>           batchContainsPuts = true;
>         } else {
>           mutation = ProtobufUtil.toDelete(m, cells);
>           batchContainsDelete = true;
>         }
>         mutationActionMap.put(mutation, action);
>         mArray[i++] = mutation;
>         checkCellSizeLimit(region, mutation);
>         // Check if a space quota disallows this mutation
>         spaceQuotaEnforcement.getPolicyEnforcement(region).check(mutation);
>         quota.addMutation(mutation);
>       }
> {code}
> rs has caught the exception but it doesn't have the cellscanner skip the failed cells.
> {code:java}
>     } catch (IOException ie) {
>       if (atomic) {
>         throw ie;
>       }
>       for (Action mutation : mutations) {
>         builder.addResultOrException(getResultOrException(ie, mutation.getIndex()));
>       }
>     }
> {code}
> The bug results in the WrongRowIOException to remaining mutations since they refer to
invalid cells.

This message was sent by Atlassian JIRA

View raw message