[
https://issues.apache.org/jira/browse/HBASE-19437?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16280151#comment-16280151
]
Chia-Ping Tsai commented on HBASE-19437:
----------------------------------------
bq. In this case, what we were returning? Null or empty? (In 1.x)..
The cases impacted by {{isReturnResults}} are shown below.
1) all done and {{isReturnResults}} is false
||branch-1||master||
|return null|return empty|
The change is made by HBASE-16283. It tried to fix the bug about that the batch
operation can' handle the null. (the case differs from this issue)
2) preAppendAfterRowLock return stuff and {{isReturnResults}} is false
||branch-1||master||
|doesn't work|return null|
The change is made by HBASE-15285
bq. If we change, that will be a BC break?
User won't receive the null value from append/increment after this fix. I don't
think it is a BC break as the empty is what we should return to user when there
is nothing to return.
> Batch operation can't handle the null result for Append/Increment
> -----------------------------------------------------------------
>
> Key: HBASE-19437
> URL: https://issues.apache.org/jira/browse/HBASE-19437
> Project: HBase
> Issue Type: Bug
> Reporter: Chia-Ping Tsai
> Assignee: Chia-Ping Tsai
> Fix For: 2.0.0
>
> Attachments: HBASE-19437.v0.patch
>
>
> But the Table#append and #increment can handle the null result...that is an
> inconsistent behavior for user.
> I have noticed two scenarios that server will return null result to user.
> # postAppend/postIncrement return null
> # mutation.isReturnResults() is false and
> preIncrementAfterRowLock/preAppendAfterRowLock doesn't return null
> We should wrap the null to empty result on server side. CP user should throw
> Exception rather than return null if they intend to say something is broken.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)