You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Feng Honghua (JIRA)" <ji...@apache.org> on 2013/12/23 03:05:50 UTC

[jira] [Updated] (HBASE-7226) HRegion.checkAndMutate uses incorrect comparison result for <, <=, > and >=

     [ https://issues.apache.org/jira/browse/HBASE-7226?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Feng Honghua updated HBASE-7226:
--------------------------------

              Priority: Major  (was: Minor)
           Environment:     (was: 0.94.2)
     Affects Version/s:     (was: 0.94.2)
              Assignee: Feng Honghua
    Remaining Estimate:     (was: 10m)
     Original Estimate:     (was: 10m)

> HRegion.checkAndMutate uses incorrect comparison result for <, <=, > and >=
> ---------------------------------------------------------------------------
>
>                 Key: HBASE-7226
>                 URL: https://issues.apache.org/jira/browse/HBASE-7226
>             Project: HBase
>          Issue Type: Bug
>          Components: regionserver
>            Reporter: Feng Honghua
>            Assignee: Feng Honghua
>         Attachments: HRegion_HBASE_7226_0.94.2.patch
>
>
> in HRegion.checkAndMutate, incorrect comparison results are used for <, <=, > and >=, as below:
>           switch (compareOp) {
>           case LESS:
>             matches = compareResult <= 0;  // should be '<' here
>             break;
>           case LESS_OR_EQUAL:
>             matches = compareResult < 0;  // should be '<=' here
>             break;
>           case EQUAL:
>             matches = compareResult == 0;
>             break;
>           case NOT_EQUAL:
>             matches = compareResult != 0;
>             break;
>           case GREATER_OR_EQUAL:
>             matches = compareResult > 0;  // should be '>=' here
>             break;
>           case GREATER:
>             matches = compareResult >= 0;  // should be '>' here
>             break;



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)