[ 
https://issues.apache.org/jira/browse/HBASE-26742?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17493415#comment-17493415
 ] 

Hudson commented on HBASE-26742:
--------------------------------

Results for branch master
        [build #518 on 
builds.a.o|https://ci-hbase.apache.org/job/HBase%20Nightly/job/master/518/]: 
(x) *{color:red}-1 overall{color}*
----
details (if available):

(/) {color:green}+1 general checks{color}
-- For more information [see general 
report|https://ci-hbase.apache.org/job/HBase%20Nightly/job/master/518/General_20Nightly_20Build_20Report/]






(/) {color:green}+1 jdk8 hadoop3 checks{color}
-- For more information [see jdk8 (hadoop3) 
report|https://ci-hbase.apache.org/job/HBase%20Nightly/job/master/518/JDK8_20Nightly_20Build_20Report_20_28Hadoop3_29/]


(/) {color:green}+1 jdk11 hadoop3 checks{color}
-- For more information [see jdk11 
report|https://ci-hbase.apache.org/job/HBase%20Nightly/job/master/518/JDK11_20Nightly_20Build_20Report_20_28Hadoop3_29/]


(/) {color:green}+1 source release artifact{color}
-- See build output for details.


(/) {color:green}+1 client integration test{color}


> Comparator of NOT_EQUAL NULL is invalid for checkAndMutate
> ----------------------------------------------------------
>
>                 Key: HBASE-26742
>                 URL: https://issues.apache.org/jira/browse/HBASE-26742
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 3.0.0-alpha-2, 2.4.9
>            Reporter: Xiaolin Ha
>            Assignee: Xiaolin Ha
>            Priority: Major
>             Fix For: 2.5.0, 3.0.0-alpha-3, 2.4.10
>
>
>  In server side, checkAndMutate ignores CompareOperator for null or empty 
> comparator value, but NOT_EQUAL should be treated specially.
> The check logic in HRegion#checkAndMutateInternal is as follows,
> {code:java}
> boolean valueIsNull =
>   comparator.getValue() == null || comparator.getValue().length == 0;
> if (result.isEmpty() && valueIsNull) {
>   matches = true;
> } else if (result.size() > 0 && result.get(0).getValueLength() == 0 && 
> valueIsNull) {
>   matches = true;
>   cellTs = result.get(0).getTimestamp();
> } else if (result.size() == 1 && !valueIsNull) {
>   Cell kv = result.get(0);
>   cellTs = kv.getTimestamp();
>   int compareResult = PrivateCellUtil.compareValue(kv, comparator);
>   matches = matches(op, compareResult);
> }{code}
> For current logics, here are some  counter examples(Comparator value is set 
> null),
>  # result is null, operator is NOT_EQUAL, but matches is true;
>  # result size >0, the value of the first cell is empty, operator is 
> NOT_EQUAL, but matches is true;
>  # result size is 1, operator is NOT_EQUAL, but matches is false;



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to