Description
For RSRpcServices#doNonAtomicRegionMutation() :
for (ClientProtos.Action action: actions.getActionList()) { ... } catch (IOException ie) { rpcServer.getMetrics().exception(ie); resultOrExceptionBuilder = ResultOrException.newBuilder(). setException(ResponseConverter.buildException(ie)); } if (resultOrExceptionBuilder != null) { // Propagate index. resultOrExceptionBuilder.setIndex(action.getIndex()); builder.addResultOrException(resultOrExceptionBuilder.build()); }
The exceptions are added to builder in the for loop.
The ClientProtos.ResultOrException.Builder instance is created within the for loop.
For large multi call, this may incur non-trivial overhead for garbage collector if there're many exceptions.
e.g. Here was sample debug log showing the actions in a batch:
2016-12-23 04:21:56,263 DEBUG org.apache.hadoop.hbase.regionserver.RSRpcServices: NonAtomicRegionMutation batch summary: numAppends=0, numDeletes=11, numGets=0, numIncrements=15638, numPuts=15627, numServiceCalls=0, serializedSize=3871713, user=hbase/pob3.G.COM (auth:KERBEROS), client=null
Note the large number of increments in the batch.
When the increments encounter conflict at server side, the overhead of stringified exceptions in response is considerable.
Attachments
Attachments
Issue Links
- is related to
-
HBASE-17408 Introduce per request limit by number of mutations
- Resolved