Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
Reviewed
Description
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.
case SUCCESS: builder.addResultOrException( getResultOrException(ClientProtos.Result.getDefaultInstance(), index)); break;
If OperationStatus returned by Region#batchMutate has valid Result object, it should be used by RSRpcServices while returning the response.
Attachments
Issue Links
- is depended upon by
-
PHOENIX-6714 Return update status from Conditional Upserts
- Open
- links to