Description
If set Append/Increment's ReturnResult attribute to false, and batch the appends/increments to server. The batch operation will always return false.
The reason is that, since return result is set to false, append/increment will return null instead of Result object. But in ResponseConverter#getResults, there is some check code
if (requestRegionActionCount != responseRegionActionResultCount) { throw new IllegalStateException("Request mutation count=" + requestRegionActionCount + " does not match response mutation result count=" + responseRegionActionResultCount); }
That means if the result count is not meet with request mutation count, it will fail the request.
The solution is simple, instead of returning a null result, returning a empty result if ReturnResult set to false.
Attachments
Attachments
Issue Links
- is duplicated by
-
HBASE-18755 Set Increment getReturnResults to false will cause batch failed by using BufferedMutator
- Open