[
https://issues.apache.org/jira/browse/HBASE-28424?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Viraj Jasani resolved HBASE-28424.
----------------------------------
Fix Version/s: 2.6.0
2.4.18
3.0.0-beta-2
2.5.9
Hadoop Flags: Reviewed
Resolution: Fixed
> Set correct Result to RegionActionResult for successful Put/Delete mutations
> ----------------------------------------------------------------------------
>
> Key: HBASE-28424
> URL: https://issues.apache.org/jira/browse/HBASE-28424
> Project: HBase
> Issue Type: Improvement
> Reporter: Viraj Jasani
> Assignee: Jing Yu
> Priority: Major
> Labels: pull-request-available
> Fix For: 2.6.0, 2.4.18, 3.0.0-beta-2, 2.5.9
>
>
> While returning response of multi(), RSRpcServices build the
> RegionActionResult with Result or Exception (ClientProtos.ResultOrException).
> It sets the Exception to this class in all cases where the operation fails
> with corresponding exception types e.g. NoSuchColumnFamilyException or
> FailedSanityCheckException etc.
> In case of atomic mutations Increment and Append, we add the Result object to
> ClientProtos.ResultOrException, which is used by client to retrieve result
> from the batch API: {_}Table#batch(List<? extends Row> actions, Object[]
> results){_}.
> Phoenix performs atomic mutation for Put using _preBatchMutate()_ endpoint.
> Hence, returning Result object with ResultOrException is important for the
> purpose of returning the result back to the client as part of the atomic
> operation. Even if Phoenix returns the OperationStatus (with Result) to
> MiniBatchOperationInProgress, since HBase uses the empty Result for the
> Success case, the client would not be able to get the expected result.
> {code:java}
> case SUCCESS:
> builder.addResultOrException(
> getResultOrException(ClientProtos.Result.getDefaultInstance(), index));
> break; {code}
> If OperationStatus returned by _Region#batchMutate_ has valid Result object,
> it should be used by RSRpcServices while returning the response.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)