You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "nkeywal (JIRA)" <ji...@apache.org> on 2011/07/20 17:19:00 UTC

[jira] [Created] (HBASE-4118) method regionserver.MemStore/updateColumnValue: the check for qualifier and family is missing in the code

method regionserver.MemStore/updateColumnValue: the check for qualifier and family is missing in the code
---------------------------------------------------------------------------------------------------------

                 Key: HBASE-4118
                 URL: https://issues.apache.org/jira/browse/HBASE-4118
             Project: HBase
          Issue Type: Bug
          Components: regionserver
    Affects Versions: 0.90.3
         Environment: all
            Reporter: nkeywal
            Priority: Minor


           [...]
            while (it.hasNext()) {
                KeyValue kv = it.next();

                // if this isnt the row we are interested in, then bail:
                if (!firstKv.matchingColumn(family, qualifier) || !firstKv.matchingRow(kv)) {
                    break; // rows dont match, bail.
                }

                [...]
            }


should be replaced by:
                // if this isnt the row we are interested in, then bail:
                if (!kv.matchingColumn(family, qualifier) || !firstKv.matchingRow(kv)) {
                    break; // rows dont match, bail.
                }



--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-4118) method regionserver.MemStore/updateColumnValue: the check for qualifier and family is missing in the code

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

stack commented on HBASE-4118:
------------------------------

+1 on patch (It looks like you did kv.matchingRow(firstKv) to address N's comment above Ted).

> method regionserver.MemStore/updateColumnValue: the check for qualifier and family is missing in the code
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: HBASE-4118
>                 URL: https://issues.apache.org/jira/browse/HBASE-4118
>             Project: HBase
>          Issue Type: Bug
>          Components: regionserver
>    Affects Versions: 0.90.3
>         Environment: all
>            Reporter: nkeywal
>            Priority: Minor
>         Attachments: 4118.txt
>
>
> {code}
>            [...]
>             while (it.hasNext()) {
>                 KeyValue kv = it.next();
>                 // if this isnt the row we are interested in, then bail:
>                 if (!firstKv.matchingColumn(family, qualifier) || !firstKv.matchingRow(kv)) {
>                     break; // rows dont match, bail.
>                 }
>                 [...]
>             }
> {code}
> should be replaced by:
> {code}
>                 // if this isnt the row we are interested in, then bail:
>                 if (!kv.matchingColumn(family, qualifier) || !firstKv.matchingRow(kv)) {
>                     break; // rows dont match, bail.
>                 }
> {code}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HBASE-4118) method regionserver.MemStore/updateColumnValue: the check for qualifier and family is missing in the code

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

Ted Yu updated HBASE-4118:
--------------------------

    Attachment: 4118-v2.txt

This is the version I plan to commit.

> method regionserver.MemStore/updateColumnValue: the check for qualifier and family is missing in the code
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: HBASE-4118
>                 URL: https://issues.apache.org/jira/browse/HBASE-4118
>             Project: HBase
>          Issue Type: Bug
>          Components: regionserver
>    Affects Versions: 0.90.3
>         Environment: all
>            Reporter: nkeywal
>            Priority: Minor
>         Attachments: 4118-v2.txt, 4118.txt
>
>
> {code}
>            [...]
>             while (it.hasNext()) {
>                 KeyValue kv = it.next();
>                 // if this isnt the row we are interested in, then bail:
>                 if (!firstKv.matchingColumn(family, qualifier) || !firstKv.matchingRow(kv)) {
>                     break; // rows dont match, bail.
>                 }
>                 [...]
>             }
> {code}
> should be replaced by:
> {code}
>                 // if this isnt the row we are interested in, then bail:
>                 if (!kv.matchingColumn(family, qualifier) || !firstKv.matchingRow(kv)) {
>                     break; // rows dont match, bail.
>                 }
> {code}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-4118) method regionserver.MemStore/updateColumnValue: the check for qualifier and family is missing in the code

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

stack commented on HBASE-4118:
------------------------------

bq. "kv.matchingRow(kv)" is really what you want?

It should be firstKv.matchingRow(kv)?

Mr. N, can you attach the patch to the issue rather than paste it in.  Makes it easier review and apply.  Thanks.

> method regionserver.MemStore/updateColumnValue: the check for qualifier and family is missing in the code
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: HBASE-4118
>                 URL: https://issues.apache.org/jira/browse/HBASE-4118
>             Project: HBase
>          Issue Type: Bug
>          Components: regionserver
>    Affects Versions: 0.90.3
>         Environment: all
>            Reporter: nkeywal
>            Priority: Minor
>
> {code}
>            [...]
>             while (it.hasNext()) {
>                 KeyValue kv = it.next();
>                 // if this isnt the row we are interested in, then bail:
>                 if (!firstKv.matchingColumn(family, qualifier) || !firstKv.matchingRow(kv)) {
>                     break; // rows dont match, bail.
>                 }
>                 [...]
>             }
> {code}
> should be replaced by:
> {code}
>                 // if this isnt the row we are interested in, then bail:
>                 if (!kv.matchingColumn(family, qualifier) || !firstKv.matchingRow(kv)) {
>                     break; // rows dont match, bail.
>                 }
> {code}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-4118) method regionserver.MemStore/updateColumnValue: the check for qualifier and family is missing in the code

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

nkeywal commented on HBASE-4118:
--------------------------------

Seems ok to me as well. I executed the tests on the previous patch version, they're ok.

> method regionserver.MemStore/updateColumnValue: the check for qualifier and family is missing in the code
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: HBASE-4118
>                 URL: https://issues.apache.org/jira/browse/HBASE-4118
>             Project: HBase
>          Issue Type: Bug
>          Components: regionserver
>    Affects Versions: 0.90.3
>         Environment: all
>            Reporter: nkeywal
>            Priority: Minor
>         Attachments: 4118-v2.txt, 4118.txt
>
>
> {code}
>            [...]
>             while (it.hasNext()) {
>                 KeyValue kv = it.next();
>                 // if this isnt the row we are interested in, then bail:
>                 if (!firstKv.matchingColumn(family, qualifier) || !firstKv.matchingRow(kv)) {
>                     break; // rows dont match, bail.
>                 }
>                 [...]
>             }
> {code}
> should be replaced by:
> {code}
>                 // if this isnt the row we are interested in, then bail:
>                 if (!kv.matchingColumn(family, qualifier) || !firstKv.matchingRow(kv)) {
>                     break; // rows dont match, bail.
>                 }
> {code}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HBASE-4118) method regionserver.MemStore/updateColumnValue: the check for qualifier and family is missing in the code

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

Ted Yu updated HBASE-4118:
--------------------------

    Attachment: 4118.txt

Patch with slight modification.

TestGlobalMemStoreSize, TestMemStore and TestMemStoreLAB passed

> method regionserver.MemStore/updateColumnValue: the check for qualifier and family is missing in the code
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: HBASE-4118
>                 URL: https://issues.apache.org/jira/browse/HBASE-4118
>             Project: HBase
>          Issue Type: Bug
>          Components: regionserver
>    Affects Versions: 0.90.3
>         Environment: all
>            Reporter: nkeywal
>            Priority: Minor
>         Attachments: 4118.txt
>
>
> {code}
>            [...]
>             while (it.hasNext()) {
>                 KeyValue kv = it.next();
>                 // if this isnt the row we are interested in, then bail:
>                 if (!firstKv.matchingColumn(family, qualifier) || !firstKv.matchingRow(kv)) {
>                     break; // rows dont match, bail.
>                 }
>                 [...]
>             }
> {code}
> should be replaced by:
> {code}
>                 // if this isnt the row we are interested in, then bail:
>                 if (!kv.matchingColumn(family, qualifier) || !firstKv.matchingRow(kv)) {
>                     break; // rows dont match, bail.
>                 }
> {code}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-4118) method regionserver.MemStore#updateColumnValue: the check for qualifier and family is missing

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

Ted Yu commented on HBASE-4118:
-------------------------------

Integrated to branch and TRUNK.

Please use two spaces for tab in the future.

Thanks for the patch nkeywal.

> method regionserver.MemStore#updateColumnValue: the check for qualifier and family is missing
> ---------------------------------------------------------------------------------------------
>
>                 Key: HBASE-4118
>                 URL: https://issues.apache.org/jira/browse/HBASE-4118
>             Project: HBase
>          Issue Type: Bug
>          Components: regionserver
>    Affects Versions: 0.90.3
>         Environment: all
>            Reporter: nkeywal
>            Assignee: nkeywal
>            Priority: Minor
>         Attachments: 4118-v2.txt, 4118.txt
>
>
> {code}
>            [...]
>             while (it.hasNext()) {
>                 KeyValue kv = it.next();
>                 // if this isnt the row we are interested in, then bail:
>                 if (!firstKv.matchingColumn(family, qualifier) || !firstKv.matchingRow(kv)) {
>                     break; // rows dont match, bail.
>                 }
>                 [...]
>             }
> {code}
> should be replaced by:
> {code}
>                 // if this isnt the row we are interested in, then bail:
>                 if (!kv.matchingColumn(family, qualifier) || !firstKv.matchingRow(kv)) {
>                     break; // rows dont match, bail.
>                 }
> {code}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-4118) method regionserver.MemStore/updateColumnValue: the check for qualifier and family is missing in the code

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

stack commented on HBASE-4118:
------------------------------

Mr N.  This is a good find.  We should make a KV#matchingRowAndColumn rather than go in there twice?

> method regionserver.MemStore/updateColumnValue: the check for qualifier and family is missing in the code
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: HBASE-4118
>                 URL: https://issues.apache.org/jira/browse/HBASE-4118
>             Project: HBase
>          Issue Type: Bug
>          Components: regionserver
>    Affects Versions: 0.90.3
>         Environment: all
>            Reporter: nkeywal
>            Priority: Minor
>
>            [...]
>             while (it.hasNext()) {
>                 KeyValue kv = it.next();
>                 // if this isnt the row we are interested in, then bail:
>                 if (!firstKv.matchingColumn(family, qualifier) || !firstKv.matchingRow(kv)) {
>                     break; // rows dont match, bail.
>                 }
>                 [...]
>             }
> should be replaced by:
>                 // if this isnt the row we are interested in, then bail:
>                 if (!kv.matchingColumn(family, qualifier) || !kv.matchingRow(kv)) {
>                     break; // rows dont match, bail.
>                 }

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HBASE-4118) method regionserver.MemStore/updateColumnValue: the check for qualifier and family is missing in the code

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

Ted Yu updated HBASE-4118:
--------------------------

    Description: 
           [...]
            while (it.hasNext()) {
                KeyValue kv = it.next();

                // if this isnt the row we are interested in, then bail:
                if (!firstKv.matchingColumn(family, qualifier) || !firstKv.matchingRow(kv)) {
                    break; // rows dont match, bail.
                }

                [...]
            }


should be replaced by:
                // if this isnt the row we are interested in, then bail:
                if (!kv.matchingColumn(family, qualifier) || !kv.matchingRow(kv)) {
                    break; // rows dont match, bail.
                }



  was:
           [...]
            while (it.hasNext()) {
                KeyValue kv = it.next();

                // if this isnt the row we are interested in, then bail:
                if (!firstKv.matchingColumn(family, qualifier) || !firstKv.matchingRow(kv)) {
                    break; // rows dont match, bail.
                }

                [...]
            }


should be replaced by:
                // if this isnt the row we are interested in, then bail:
                if (!kv.matchingColumn(family, qualifier) || !firstKv.matchingRow(kv)) {
                    break; // rows dont match, bail.
                }




> method regionserver.MemStore/updateColumnValue: the check for qualifier and family is missing in the code
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: HBASE-4118
>                 URL: https://issues.apache.org/jira/browse/HBASE-4118
>             Project: HBase
>          Issue Type: Bug
>          Components: regionserver
>    Affects Versions: 0.90.3
>         Environment: all
>            Reporter: nkeywal
>            Priority: Minor
>
>            [...]
>             while (it.hasNext()) {
>                 KeyValue kv = it.next();
>                 // if this isnt the row we are interested in, then bail:
>                 if (!firstKv.matchingColumn(family, qualifier) || !firstKv.matchingRow(kv)) {
>                     break; // rows dont match, bail.
>                 }
>                 [...]
>             }
> should be replaced by:
>                 // if this isnt the row we are interested in, then bail:
>                 if (!kv.matchingColumn(family, qualifier) || !kv.matchingRow(kv)) {
>                     break; // rows dont match, bail.
>                 }

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Assigned] (HBASE-4118) method regionserver.MemStore#updateColumnValue: the check for qualifier and family is missing

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

Ted Yu reassigned HBASE-4118:
-----------------------------

    Assignee: nkeywal

> method regionserver.MemStore#updateColumnValue: the check for qualifier and family is missing
> ---------------------------------------------------------------------------------------------
>
>                 Key: HBASE-4118
>                 URL: https://issues.apache.org/jira/browse/HBASE-4118
>             Project: HBase
>          Issue Type: Bug
>          Components: regionserver
>    Affects Versions: 0.90.3
>         Environment: all
>            Reporter: nkeywal
>            Assignee: nkeywal
>            Priority: Minor
>         Attachments: 4118-v2.txt, 4118.txt
>
>
> {code}
>            [...]
>             while (it.hasNext()) {
>                 KeyValue kv = it.next();
>                 // if this isnt the row we are interested in, then bail:
>                 if (!firstKv.matchingColumn(family, qualifier) || !firstKv.matchingRow(kv)) {
>                     break; // rows dont match, bail.
>                 }
>                 [...]
>             }
> {code}
> should be replaced by:
> {code}
>                 // if this isnt the row we are interested in, then bail:
>                 if (!kv.matchingColumn(family, qualifier) || !firstKv.matchingRow(kv)) {
>                     break; // rows dont match, bail.
>                 }
> {code}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-4118) method regionserver.MemStore/updateColumnValue: the check for qualifier and family is missing in the code

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

Ted Yu commented on HBASE-4118:
-------------------------------

I restored the body of this JIRA and formatted a little.

> method regionserver.MemStore/updateColumnValue: the check for qualifier and family is missing in the code
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: HBASE-4118
>                 URL: https://issues.apache.org/jira/browse/HBASE-4118
>             Project: HBase
>          Issue Type: Bug
>          Components: regionserver
>    Affects Versions: 0.90.3
>         Environment: all
>            Reporter: nkeywal
>            Priority: Minor
>
> {code}
>            [...]
>             while (it.hasNext()) {
>                 KeyValue kv = it.next();
>                 // if this isnt the row we are interested in, then bail:
>                 if (!firstKv.matchingColumn(family, qualifier) || !firstKv.matchingRow(kv)) {
>                     break; // rows dont match, bail.
>                 }
>                 [...]
>             }
> {code}
> should be replaced by:
> {code}
>                 // if this isnt the row we are interested in, then bail:
>                 if (!kv.matchingColumn(family, qualifier) || !firstKv.matchingRow(kv)) {
>                     break; // rows dont match, bail.
>                 }
> {code}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-4118) method regionserver.MemStore#updateColumnValue: the check for qualifier and family is missing

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

Hudson commented on HBASE-4118:
-------------------------------

Integrated in HBase-TRUNK #2045 (See [https://builds.apache.org/job/HBase-TRUNK/2045/])
    HBASE-4118  method regionserver.MemStore#updateColumnValue: the check for 
               qualifier and family is missing (N Keywal via Ted Yu)

tedyu : 
Files : 
* /hbase/trunk/CHANGES.txt
* /hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/MemStore.java


> method regionserver.MemStore#updateColumnValue: the check for qualifier and family is missing
> ---------------------------------------------------------------------------------------------
>
>                 Key: HBASE-4118
>                 URL: https://issues.apache.org/jira/browse/HBASE-4118
>             Project: HBase
>          Issue Type: Bug
>          Components: regionserver
>    Affects Versions: 0.90.3
>         Environment: all
>            Reporter: nkeywal
>            Assignee: nkeywal
>            Priority: Minor
>             Fix For: 0.90.4
>
>         Attachments: 4118-v2.txt, 4118.txt
>
>
> {code}
>            [...]
>             while (it.hasNext()) {
>                 KeyValue kv = it.next();
>                 // if this isnt the row we are interested in, then bail:
>                 if (!firstKv.matchingColumn(family, qualifier) || !firstKv.matchingRow(kv)) {
>                     break; // rows dont match, bail.
>                 }
>                 [...]
>             }
> {code}
> should be replaced by:
> {code}
>                 // if this isnt the row we are interested in, then bail:
>                 if (!kv.matchingColumn(family, qualifier) || !firstKv.matchingRow(kv)) {
>                     break; // rows dont match, bail.
>                 }
> {code}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HBASE-4118) method regionserver.MemStore/updateColumnValue: the check for qualifier and family is missing in the code

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

Ted Yu updated HBASE-4118:
--------------------------

    Description: 
{code}
           [...]
            while (it.hasNext()) {
                KeyValue kv = it.next();

                // if this isnt the row we are interested in, then bail:
                if (!firstKv.matchingColumn(family, qualifier) || !firstKv.matchingRow(kv)) {
                    break; // rows dont match, bail.
                }

                [...]
            }
{code}
should be replaced by:
{code}
                // if this isnt the row we are interested in, then bail:
                if (!kv.matchingColumn(family, qualifier) || !firstKv.matchingRow(kv)) {
                    break; // rows dont match, bail.
                }
{code}

  was:
           [...]
            while (it.hasNext()) {
                KeyValue kv = it.next();

                // if this isnt the row we are interested in, then bail:
                if (!firstKv.matchingColumn(family, qualifier) || !firstKv.matchingRow(kv)) {
                    break; // rows dont match, bail.
                }

                [...]
            }


should be replaced by:
                // if this isnt the row we are interested in, then bail:
                if (!kv.matchingColumn(family, qualifier) || !kv.matchingRow(kv)) {
                    break; // rows dont match, bail.
                }




> method regionserver.MemStore/updateColumnValue: the check for qualifier and family is missing in the code
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: HBASE-4118
>                 URL: https://issues.apache.org/jira/browse/HBASE-4118
>             Project: HBase
>          Issue Type: Bug
>          Components: regionserver
>    Affects Versions: 0.90.3
>         Environment: all
>            Reporter: nkeywal
>            Priority: Minor
>
> {code}
>            [...]
>             while (it.hasNext()) {
>                 KeyValue kv = it.next();
>                 // if this isnt the row we are interested in, then bail:
>                 if (!firstKv.matchingColumn(family, qualifier) || !firstKv.matchingRow(kv)) {
>                     break; // rows dont match, bail.
>                 }
>                 [...]
>             }
> {code}
> should be replaced by:
> {code}
>                 // if this isnt the row we are interested in, then bail:
>                 if (!kv.matchingColumn(family, qualifier) || !firstKv.matchingRow(kv)) {
>                     break; // rows dont match, bail.
>                 }
> {code}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-4118) method regionserver.MemStore/updateColumnValue: the check for qualifier and family is missing in the code

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

nkeywal commented on HBASE-4118:
--------------------------------

This patch:
- fix the point mention in the bug
- modify the order of the test before updating the now value to improve the performances
- remove a redundant array creation in the return.

diff --git a/src/main/java/org/apache/hadoop/hbase/regionserver/MemStore.java b/src/main/java/org/apache/hadoop/hbase/regionserver/MemStore.java
index 4b5d62f..d75c30e 100644
--- a/src/main/java/org/apache/hadoop/hbase/regionserver/MemStore.java
+++ b/src/main/java/org/apache/hadoop/hbase/regionserver/MemStore.java
@@ -458,25 +458,24 @@ public class MemStore implements HeapSize {
         KeyValue kv = it.next();
 
         // if this isnt the row we are interested in, then bail:
-        if (!firstKv.matchingColumn(family,qualifier) || !firstKv.matchingRow(kv) ) {
+        if (!kv.matchingColumn(family,qualifier) || !firstKv.matchingRow(kv) ) {
           break; // rows dont match, bail.
         }
 
         // if the qualifier matches and it's a put, just RM it out of the kvset.
-        if (firstKv.matchingQualifier(kv)) {
-          // to be extra safe we only remove Puts that have a memstoreTS==0
-          if (kv.getType() == KeyValue.Type.Put.getCode()) {
-            now = Math.max(now, kv.getTimestamp());
+        if (kv.getType() == KeyValue.Type.Put.getCode() &&
+                  kv.getTimestamp() > now &&
+                firstKv.matchingQualifier(kv)
+              ) {
+            now = kv.getTimestamp();
           }
         }
-      }
 
       // create or update (upsert) a new KeyValue with
       // 'now' and a 0 memstoreTS == immediately visible
-      return upsert(Arrays.asList(new KeyValue [] {
-          new KeyValue(row, family, qualifier, now,
-              Bytes.toBytes(newValue))
-      }));
+      return upsert(Arrays.asList(
+              new KeyValue(row, family, qualifier, now, Bytes.toBytes(newValue)))
+      );
     } finally {
       this.lock.readLock().unlock();
     }


> method regionserver.MemStore/updateColumnValue: the check for qualifier and family is missing in the code
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: HBASE-4118
>                 URL: https://issues.apache.org/jira/browse/HBASE-4118
>             Project: HBase
>          Issue Type: Bug
>          Components: regionserver
>    Affects Versions: 0.90.3
>         Environment: all
>            Reporter: nkeywal
>            Priority: Minor
>
>            [...]
>             while (it.hasNext()) {
>                 KeyValue kv = it.next();
>                 // if this isnt the row we are interested in, then bail:
>                 if (!firstKv.matchingColumn(family, qualifier) || !firstKv.matchingRow(kv)) {
>                     break; // rows dont match, bail.
>                 }
>                 [...]
>             }
> should be replaced by:
>                 // if this isnt the row we are interested in, then bail:
>                 if (!kv.matchingColumn(family, qualifier) || !firstKv.matchingRow(kv)) {
>                     break; // rows dont match, bail.
>                 }

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-4118) method regionserver.MemStore/updateColumnValue: the check for qualifier and family is missing in the code

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

Ted Yu commented on HBASE-4118:
-------------------------------

I corrected an error in the body of this JIRA.

Please generate a patch file and attach to this issue. Don't paste changes directly as comment.

Also, verify that all tests pass.

> method regionserver.MemStore/updateColumnValue: the check for qualifier and family is missing in the code
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: HBASE-4118
>                 URL: https://issues.apache.org/jira/browse/HBASE-4118
>             Project: HBase
>          Issue Type: Bug
>          Components: regionserver
>    Affects Versions: 0.90.3
>         Environment: all
>            Reporter: nkeywal
>            Priority: Minor
>
>            [...]
>             while (it.hasNext()) {
>                 KeyValue kv = it.next();
>                 // if this isnt the row we are interested in, then bail:
>                 if (!firstKv.matchingColumn(family, qualifier) || !firstKv.matchingRow(kv)) {
>                     break; // rows dont match, bail.
>                 }
>                 [...]
>             }
> should be replaced by:
>                 // if this isnt the row we are interested in, then bail:
>                 if (!kv.matchingColumn(family, qualifier) || !kv.matchingRow(kv)) {
>                     break; // rows dont match, bail.
>                 }

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (HBASE-4118) method regionserver.MemStore#updateColumnValue: the check for qualifier and family is missing

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

Ted Yu resolved HBASE-4118.
---------------------------

       Resolution: Fixed
    Fix Version/s: 0.90.4
     Hadoop Flags: [Reviewed]

> method regionserver.MemStore#updateColumnValue: the check for qualifier and family is missing
> ---------------------------------------------------------------------------------------------
>
>                 Key: HBASE-4118
>                 URL: https://issues.apache.org/jira/browse/HBASE-4118
>             Project: HBase
>          Issue Type: Bug
>          Components: regionserver
>    Affects Versions: 0.90.3
>         Environment: all
>            Reporter: nkeywal
>            Assignee: nkeywal
>            Priority: Minor
>             Fix For: 0.90.4
>
>         Attachments: 4118-v2.txt, 4118.txt
>
>
> {code}
>            [...]
>             while (it.hasNext()) {
>                 KeyValue kv = it.next();
>                 // if this isnt the row we are interested in, then bail:
>                 if (!firstKv.matchingColumn(family, qualifier) || !firstKv.matchingRow(kv)) {
>                     break; // rows dont match, bail.
>                 }
>                 [...]
>             }
> {code}
> should be replaced by:
> {code}
>                 // if this isnt the row we are interested in, then bail:
>                 if (!kv.matchingColumn(family, qualifier) || !firstKv.matchingRow(kv)) {
>                     break; // rows dont match, bail.
>                 }
> {code}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-4118) method regionserver.MemStore/updateColumnValue: the check for qualifier and family is missing in the code

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

nkeywal commented on HBASE-4118:
--------------------------------

Hi,

If I read well your modification, the new version is:

                if (!kv.matchingColumn(family, qualifier) || !*
kv.matchingRow(kv)*) {
                    break; // rows dont match, bail.
                }

"kv.matchingRow(kv)" is really what you want? This should noy  always return
true (I am a beginner here :-))

And not kv.matchingRow(row) (equivalent to firstKv.matchingRow(kv), but
cleaner imho)?










> method regionserver.MemStore/updateColumnValue: the check for qualifier and family is missing in the code
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: HBASE-4118
>                 URL: https://issues.apache.org/jira/browse/HBASE-4118
>             Project: HBase
>          Issue Type: Bug
>          Components: regionserver
>    Affects Versions: 0.90.3
>         Environment: all
>            Reporter: nkeywal
>            Priority: Minor
>
>            [...]
>             while (it.hasNext()) {
>                 KeyValue kv = it.next();
>                 // if this isnt the row we are interested in, then bail:
>                 if (!firstKv.matchingColumn(family, qualifier) || !firstKv.matchingRow(kv)) {
>                     break; // rows dont match, bail.
>                 }
>                 [...]
>             }
> should be replaced by:
>                 // if this isnt the row we are interested in, then bail:
>                 if (!kv.matchingColumn(family, qualifier) || !kv.matchingRow(kv)) {
>                     break; // rows dont match, bail.
>                 }

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HBASE-4118) method regionserver.MemStore#updateColumnValue: the check for qualifier and family is missing

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

Ted Yu updated HBASE-4118:
--------------------------

    Summary: method regionserver.MemStore#updateColumnValue: the check for qualifier and family is missing  (was: method regionserver.MemStore/updateColumnValue: the check for qualifier and family is missing in the code)

> method regionserver.MemStore#updateColumnValue: the check for qualifier and family is missing
> ---------------------------------------------------------------------------------------------
>
>                 Key: HBASE-4118
>                 URL: https://issues.apache.org/jira/browse/HBASE-4118
>             Project: HBase
>          Issue Type: Bug
>          Components: regionserver
>    Affects Versions: 0.90.3
>         Environment: all
>            Reporter: nkeywal
>            Priority: Minor
>         Attachments: 4118-v2.txt, 4118.txt
>
>
> {code}
>            [...]
>             while (it.hasNext()) {
>                 KeyValue kv = it.next();
>                 // if this isnt the row we are interested in, then bail:
>                 if (!firstKv.matchingColumn(family, qualifier) || !firstKv.matchingRow(kv)) {
>                     break; // rows dont match, bail.
>                 }
>                 [...]
>             }
> {code}
> should be replaced by:
> {code}
>                 // if this isnt the row we are interested in, then bail:
>                 if (!kv.matchingColumn(family, qualifier) || !firstKv.matchingRow(kv)) {
>                     break; // rows dont match, bail.
>                 }
> {code}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-4118) method regionserver.MemStore/updateColumnValue: the check for qualifier and family is missing in the code

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

nkeywal commented on HBASE-4118:
--------------------------------

Sorry for the delay. I will create a proper patch next time. I am going to execute the tests on your patch on my env and will come back to you, so far it seems ok for me.


On "We should make a KV#matchingRowAndColumn rather than go in there twice?", I don't know yet. It seems that multiple optimizations are possible. I am going to proposethe easiest ones first, and then check what remains. 



> method regionserver.MemStore/updateColumnValue: the check for qualifier and family is missing in the code
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: HBASE-4118
>                 URL: https://issues.apache.org/jira/browse/HBASE-4118
>             Project: HBase
>          Issue Type: Bug
>          Components: regionserver
>    Affects Versions: 0.90.3
>         Environment: all
>            Reporter: nkeywal
>            Priority: Minor
>         Attachments: 4118.txt
>
>
> {code}
>            [...]
>             while (it.hasNext()) {
>                 KeyValue kv = it.next();
>                 // if this isnt the row we are interested in, then bail:
>                 if (!firstKv.matchingColumn(family, qualifier) || !firstKv.matchingRow(kv)) {
>                     break; // rows dont match, bail.
>                 }
>                 [...]
>             }
> {code}
> should be replaced by:
> {code}
>                 // if this isnt the row we are interested in, then bail:
>                 if (!kv.matchingColumn(family, qualifier) || !firstKv.matchingRow(kv)) {
>                     break; // rows dont match, bail.
>                 }
> {code}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira