[
https://issues.apache.org/jira/browse/HBASE-14703?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jesse Yates updated HBASE-14703:
--------------------------------
Attachment: HBASE-14703-start.patch
So I was getting confused with the result returned in the client-small-scan
that, I think, is just used to lookup the region; note that this does _not_
update any stats b/c the form of the result is 'wrong' for stats (its an array
of results).
Adding a second put, I see that only the asyncProcess check is used to collect
stats from the result.
The best I can tell is the StatsTrackingRpcRetryingCaller was there to catch
cases where we don't go through the multi() calls.
I think the "right" way to fix this, following the original intent of the code,
is to add support for unwrapping results from the other, non-put calls.
Currently, things like mutateRows _don't return a result_, even though there is
information there. Thus, the right thing to do would seem to be unwrapping that
result and letting the StatsTrackingRpcCaller handle the result's stats as we
would expect.
I'm attaching a patch that would be *starting point* for doing this - we would
need to add support in a couple more places as well.
If you apply this patch and then drop breakpoints in at
RSRpcServices#mutateRows and StatsTrackingRpcRetryingCaller#callWithRetries.
You'll see that the RS does in fact send along the stats information, but
HTable#mutateRow returns only retuns any kind of result after the changes in
the patch.
> update the per-region stats twice for the call on return
> --------------------------------------------------------
>
> Key: HBASE-14703
> URL: https://issues.apache.org/jira/browse/HBASE-14703
> Project: HBase
> Issue Type: Bug
> Reporter: Heng Chen
> Assignee: Heng Chen
> Attachments: HBASE-14703-start.patch, HBASE-14703.patch
>
>
> In {{AsyncProcess.SingleServerRequestRunnable}}, it seems we update
> serverStatistics twice.
> The first one is that we wrapper {{RetryingCallable}} by
> {{StatsTrackingRpcRetryingCaller}}, and do serverStatistics update when we
> call {{callWithRetries}} and {{callWithoutRetries}}. Relates code like below:
> {code}
> @Override
> public T callWithRetries(RetryingCallable<T> callable, int callTimeout)
> throws IOException, RuntimeException {
> T result = delegate.callWithRetries(callable, callTimeout);
> return updateStatsAndUnwrap(result, callable);
> }
> @Override
> public T callWithoutRetries(RetryingCallable<T> callable, int callTimeout)
> throws IOException, RuntimeException {
> T result = delegate.callWithRetries(callable, callTimeout);
> return updateStatsAndUnwrap(result, callable);
> }
> {code}
> The secondary one is after we get response, in {{receiveMultiAction}}, we do
> update again.
> {code}
> // update the stats about the region, if its a user table. We don't want to
> slow down
> // updates to meta tables, especially from internal updates (master, etc).
> if (AsyncProcess.this.connection.getStatisticsTracker() != null) {
> result = ResultStatsUtil.updateStats(result,
> AsyncProcess.this.connection.getStatisticsTracker(), server, regionName);
> }
> {code}
> It seems that {{StatsTrackingRpcRetryingCaller}} is NOT necessary, remove it?
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)