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 2012/11/28 06:46:58 UTC

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

Feng Honghua created HBASE-7226:
-----------------------------------

             Summary: 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
    Affects Versions: 0.94.2
         Environment: 0.94.2
            Reporter: Feng Honghua
            Priority: Minor
             Fix For: 0.94.2


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 is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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

Posted by "stack (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-7226?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13505678#comment-13505678 ] 

stack commented on HBASE-7226:
------------------------------

I'm not sure your patch correct.  Could you add a unit test to prove it is?  Thank you Feng.
                
> 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
>    Affects Versions: 0.94.2
>         Environment: 0.94.2
>            Reporter: Feng Honghua
>            Priority: Minor
>             Fix For: 0.94.2
>
>         Attachments: HRegion_HBASE_7226_0.94.2.patch
>
>   Original Estimate: 10m
>  Remaining Estimate: 10m
>
> 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 is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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

Posted by "Feng Honghua (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-7226?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

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

    Attachment: HRegion_HBASE_7226_0.94.2.patch
    
> 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
>    Affects Versions: 0.94.2
>         Environment: 0.94.2
>            Reporter: Feng Honghua
>            Priority: Minor
>             Fix For: 0.94.2
>
>         Attachments: HRegion_HBASE_7226_0.94.2.patch
>
>   Original Estimate: 10m
>  Remaining Estimate: 10m
>
> 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 is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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

Posted by "Feng Honghua (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-7226?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

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

    Attachment: checkAndMutate.patch
    
> 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
>    Affects Versions: 0.94.2
>         Environment: 0.94.2
>            Reporter: Feng Honghua
>            Priority: Minor
>             Fix For: 0.94.2
>
>         Attachments: checkAndMutate.patch
>
>   Original Estimate: 10m
>  Remaining Estimate: 10m
>
> 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 is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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

Posted by "Feng Honghua (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-7226?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

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

    Attachment:     (was: checkAndMutate.patch)
    
> 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
>    Affects Versions: 0.94.2
>         Environment: 0.94.2
>            Reporter: Feng Honghua
>            Priority: Minor
>             Fix For: 0.94.2
>
>         Attachments: HRegion_HBASE_7226_0.94.2.patch
>
>   Original Estimate: 10m
>  Remaining Estimate: 10m
>
> 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 is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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

Posted by "Feng Honghua (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-7226?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

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

    Status: Patch Available  (was: Open)
    
> 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
>    Affects Versions: 0.94.2
>         Environment: 0.94.2
>            Reporter: Feng Honghua
>            Priority: Minor
>             Fix For: 0.94.2
>
>   Original Estimate: 10m
>  Remaining Estimate: 10m
>
> 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 is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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

Posted by "Feng Honghua (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-7226?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13505236#comment-13505236 ] 

Feng Honghua commented on HBASE-7226:
-------------------------------------

the same typo bug exists for trunk as well
                
> 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
>    Affects Versions: 0.94.2
>         Environment: 0.94.2
>            Reporter: Feng Honghua
>            Priority: Minor
>             Fix For: 0.94.2
>
>         Attachments: checkAndMutate.patch
>
>   Original Estimate: 10m
>  Remaining Estimate: 10m
>
> 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 is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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

Posted by "Lars Hofhansl (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-7226?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lars Hofhansl updated HBASE-7226:
---------------------------------

    Fix Version/s:     (was: 0.94.2)
                   0.94.4
    
> 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
>    Affects Versions: 0.94.2
>         Environment: 0.94.2
>            Reporter: Feng Honghua
>            Priority: Minor
>             Fix For: 0.94.4
>
>         Attachments: HRegion_HBASE_7226_0.94.2.patch
>
>   Original Estimate: 10m
>  Remaining Estimate: 10m
>
> 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 is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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

Posted by "Hadoop QA (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-7226?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13505242#comment-13505242 ] 

Hadoop QA commented on HBASE-7226:
----------------------------------

{color:red}-1 overall{color}.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12555119/HRegion_HBASE_7226_0.94.2.patch
  against trunk revision .

    {color:green}+1 @author{color}.  The patch does not contain any @author tags.

    {color:red}-1 tests included{color}.  The patch doesn't appear to include any new or modified tests.
                        Please justify why no new tests are needed for this patch.
                        Also please list what manual steps were performed to verify this patch.

    {color:red}-1 patch{color}.  The patch command could not apply the patch.

Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/3416//console

This message is automatically generated.
                
> 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
>    Affects Versions: 0.94.2
>         Environment: 0.94.2
>            Reporter: Feng Honghua
>            Priority: Minor
>             Fix For: 0.94.2
>
>         Attachments: HRegion_HBASE_7226_0.94.2.patch
>
>   Original Estimate: 10m
>  Remaining Estimate: 10m
>
> 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 is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira