You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Joe Pallas (JIRA)" <ji...@apache.org> on 2011/09/06 23:49:11 UTC

[jira] [Created] (HBASE-4334) HRegion.get never validates row

HRegion.get never validates row
-------------------------------

                 Key: HBASE-4334
                 URL: https://issues.apache.org/jira/browse/HBASE-4334
             Project: HBase
          Issue Type: Bug
          Components: regionserver
    Affects Versions: 0.90.4
            Reporter: Joe Pallas


If a client gets confused (possibly by a hole in .META., see HBASE-4333), it may send a request to the wrong region.  Paths through put, delete, incrementColumnValue, and checkAndMutate all call checkRow either directly or indirectly (through getLock).  But get apparently does not.  This can result in returning an incorrect empty result instead of a WrongRegionException.

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

        

[jira] [Commented] (HBASE-4334) HRegion.get never validates row

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

Lars Hofhansl commented on HBASE-4334:
--------------------------------------

Probably... Maybe let it bake in 0.92/trunk for a bit?
                
> HRegion.get never validates row
> -------------------------------
>
>                 Key: HBASE-4334
>                 URL: https://issues.apache.org/jira/browse/HBASE-4334
>             Project: HBase
>          Issue Type: Bug
>          Components: regionserver
>    Affects Versions: 0.90.4
>            Reporter: Joe Pallas
>            Assignee: Lars Hofhansl
>             Fix For: 0.92.0
>
>         Attachments: 4334-v2.txt, 4334-v3.txt, 4334.txt
>
>
> If a client gets confused (possibly by a hole in .META., see HBASE-4333), it may send a request to the wrong region.  Paths through put, delete, incrementColumnValue, and checkAndMutate all call checkRow either directly or indirectly (through getLock).  But get apparently does not.  This can result in returning an incorrect empty result instead of a WrongRegionException.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-4334) HRegion.get never validates row

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

Lars Hofhansl commented on HBASE-4334:
--------------------------------------

There's a thread on the mailing about a similar issue:
we are experiencing a strange behavior in some tests we are currently performing. What we are seeing is that scans on a table that is being written to at the same time sometimes end prematurely, with no error. This seems to be heavily dependent on the write pattern.

We've been able to reproduce the issue with the standard hbase tools:

in a terminal run:

OLDV=0; OLDT=0; while true; do NEWV=`hbase shell count_testtable | head -1 | cut -d' ' -f1`; NEWT=`date +%s`; echo $NEWV " -> " $(((NEWV - OLDV) / (NEWT - OLDT))) "msg/s"; OLDV=$NEWV; OLDT=$NEWT; done

where the contents of the file count_testtable are:

count 'TestTable', INTERVAL => 100000000, CACHE => 10000
exit

This counts the rows in the TestTable repeatedly showing the number of rows and the delta rows per second inserted. In the hbase shell count is implemented as a full scan with a filter on the row key.

Meanwhile, in another terminal do:

hbase org.apache.hadoop.hbase.PerformanceEvaluation --nomapred --rows=20000 randomWrite 5

and when over:

hbase org.apache.hadoop.hbase.PerformanceEvaluation --nomapred --rows=20000 sequentialWrite 5

On the scan terminal we are seeing results similar to:

0  ->  0 msg/s
45552  ->  5694 msg/s <=== randomWrite starts
63284  ->  2955 msg/s
63284  ->  0 msg/s  <=== randomWrite ends
58829  ->  -636 msg/s <=== sequentialWrite starts
88764  ->  3741 msg/s
100000  ->  802 msg/s
100000  ->  0 msg/s <=== sequentialWrite ends

As you can see in the fifth row the count is lower than expected (resulting on a negative inserts/sec).

You may need to try a couple of times or tweak the number of rows to insert to see the problem.

                
> HRegion.get never validates row
> -------------------------------
>
>                 Key: HBASE-4334
>                 URL: https://issues.apache.org/jira/browse/HBASE-4334
>             Project: HBase
>          Issue Type: Bug
>          Components: regionserver
>    Affects Versions: 0.90.4
>            Reporter: Joe Pallas
>            Assignee: Lars Hofhansl
>             Fix For: 0.92.0
>
>         Attachments: 4334-v2.txt, 4334-v3.txt, 4334.txt
>
>
> If a client gets confused (possibly by a hole in .META., see HBASE-4333), it may send a request to the wrong region.  Paths through put, delete, incrementColumnValue, and checkAndMutate all call checkRow either directly or indirectly (through getLock).  But get apparently does not.  This can result in returning an incorrect empty result instead of a WrongRegionException.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-4334) HRegion.get never validates row

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

Ted Yu commented on HBASE-4334:
-------------------------------

Integrated to 0.92 and TRUNK.

Thanks for the patch Lars.

Thanks for the review Michael.
                
> HRegion.get never validates row
> -------------------------------
>
>                 Key: HBASE-4334
>                 URL: https://issues.apache.org/jira/browse/HBASE-4334
>             Project: HBase
>          Issue Type: Bug
>          Components: regionserver
>    Affects Versions: 0.90.4
>            Reporter: Joe Pallas
>            Assignee: Lars Hofhansl
>             Fix For: 0.92.0
>
>         Attachments: 4334-v2.txt, 4334-v3.txt, 4334.txt
>
>
> If a client gets confused (possibly by a hole in .META., see HBASE-4333), it may send a request to the wrong region.  Paths through put, delete, incrementColumnValue, and checkAndMutate all call checkRow either directly or indirectly (through getLock).  But get apparently does not.  This can result in returning an incorrect empty result instead of a WrongRegionException.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-4334) HRegion.get never validates row

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

Lars Hofhansl commented on HBASE-4334:
--------------------------------------

Wanna commit this Ted?
                
> HRegion.get never validates row
> -------------------------------
>
>                 Key: HBASE-4334
>                 URL: https://issues.apache.org/jira/browse/HBASE-4334
>             Project: HBase
>          Issue Type: Bug
>          Components: regionserver
>    Affects Versions: 0.90.4
>            Reporter: Joe Pallas
>            Assignee: Lars Hofhansl
>             Fix For: 0.92.0
>
>         Attachments: 4334-v2.txt, 4334-v3.txt, 4334.txt
>
>
> If a client gets confused (possibly by a hole in .META., see HBASE-4333), it may send a request to the wrong region.  Paths through put, delete, incrementColumnValue, and checkAndMutate all call checkRow either directly or indirectly (through getLock).  But get apparently does not.  This can result in returning an incorrect empty result instead of a WrongRegionException.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-4334) HRegion.get never validates row

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

Lars Hofhansl commented on HBASE-4334:
--------------------------------------

Sigh... I think you're right. Probably a lot of tests to fix.
                
> HRegion.get never validates row
> -------------------------------
>
>                 Key: HBASE-4334
>                 URL: https://issues.apache.org/jira/browse/HBASE-4334
>             Project: HBase
>          Issue Type: Bug
>          Components: regionserver
>    Affects Versions: 0.90.4
>            Reporter: Joe Pallas
>            Assignee: Lars Hofhansl
>             Fix For: 0.92.0
>
>         Attachments: 4334.txt
>
>
> If a client gets confused (possibly by a hole in .META., see HBASE-4333), it may send a request to the wrong region.  Paths through put, delete, incrementColumnValue, and checkAndMutate all call checkRow either directly or indirectly (through getLock).  But get apparently does not.  This can result in returning an incorrect empty result instead of a WrongRegionException.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Assigned] (HBASE-4334) HRegion.get never validates row

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

Lars Hofhansl reassigned HBASE-4334:
------------------------------------

    Assignee: Lars Hofhansl
    
> HRegion.get never validates row
> -------------------------------
>
>                 Key: HBASE-4334
>                 URL: https://issues.apache.org/jira/browse/HBASE-4334
>             Project: HBase
>          Issue Type: Bug
>          Components: regionserver
>    Affects Versions: 0.90.4
>            Reporter: Joe Pallas
>            Assignee: Lars Hofhansl
>
> If a client gets confused (possibly by a hole in .META., see HBASE-4333), it may send a request to the wrong region.  Paths through put, delete, incrementColumnValue, and checkAndMutate all call checkRow either directly or indirectly (through getLock).  But get apparently does not.  This can result in returning an incorrect empty result instead of a WrongRegionException.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-4334) HRegion.get never validates row

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

Lars Hofhansl commented on HBASE-4334:
--------------------------------------

In turns out that coprocessor can - legitimately - call HRegion.getScanner(Scan) without specifying a startkey. That works because coprocessors are already region scoped. AggregateImplementation does that for example.

There are various alternatives:
1. add getScanner(..., boolean check) that avoid that check. Coprocessors can then call that method.
2. Force coprocessor to set the start key. (i.e. just fail here too)
3. Handle gets and scans separately. Intercept scanners in HRegionServer.openScanner and do the check there.
4. Have RegionCoprocessorInterface return a wrapper of HRegion, where getScanner(...) would call would call an internal method avoiding the check. This would require extracting an interface for HRegion. Or maybe a RegionServices interface.
5. Just check whether the scanner intersects (includes containing) the region. Works fine for gets. Won't catch all cases for scans.

#1 and #2 are not obvious to the implementer of a coprocessor.

Leaning towards #3.
                
> HRegion.get never validates row
> -------------------------------
>
>                 Key: HBASE-4334
>                 URL: https://issues.apache.org/jira/browse/HBASE-4334
>             Project: HBase
>          Issue Type: Bug
>          Components: regionserver
>    Affects Versions: 0.90.4
>            Reporter: Joe Pallas
>            Assignee: Lars Hofhansl
>             Fix For: 0.92.0
>
>         Attachments: 4334-v2.txt, 4334.txt
>
>
> If a client gets confused (possibly by a hole in .META., see HBASE-4333), it may send a request to the wrong region.  Paths through put, delete, incrementColumnValue, and checkAndMutate all call checkRow either directly or indirectly (through getLock).  But get apparently does not.  This can result in returning an incorrect empty result instead of a WrongRegionException.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-4334) HRegion.get never validates row

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

Lars Hofhansl commented on HBASE-4334:
--------------------------------------

Ran all tests. Got this:
Tests run: 1021, Failures: 0, Errors: 0, Skipped: 21

[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failure or timeout

So all passed, but something is hanging.
jStack shows various shutdown related issued. So I do not think this is related to this change.

                
> HRegion.get never validates row
> -------------------------------
>
>                 Key: HBASE-4334
>                 URL: https://issues.apache.org/jira/browse/HBASE-4334
>             Project: HBase
>          Issue Type: Bug
>          Components: regionserver
>    Affects Versions: 0.90.4
>            Reporter: Joe Pallas
>            Assignee: Lars Hofhansl
>             Fix For: 0.92.0
>
>         Attachments: 4334-v2.txt, 4334.txt
>
>
> If a client gets confused (possibly by a hole in .META., see HBASE-4333), it may send a request to the wrong region.  Paths through put, delete, incrementColumnValue, and checkAndMutate all call checkRow either directly or indirectly (through getLock).  But get apparently does not.  This can result in returning an incorrect empty result instead of a WrongRegionException.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-4334) HRegion.get never validates row

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

stack commented on HBASE-4334:
------------------------------

Should this go into 0.90 too?
                
> HRegion.get never validates row
> -------------------------------
>
>                 Key: HBASE-4334
>                 URL: https://issues.apache.org/jira/browse/HBASE-4334
>             Project: HBase
>          Issue Type: Bug
>          Components: regionserver
>    Affects Versions: 0.90.4
>            Reporter: Joe Pallas
>            Assignee: Lars Hofhansl
>             Fix For: 0.92.0
>
>         Attachments: 4334-v2.txt, 4334-v3.txt, 4334.txt
>
>
> If a client gets confused (possibly by a hole in .META., see HBASE-4333), it may send a request to the wrong region.  Paths through put, delete, incrementColumnValue, and checkAndMutate all call checkRow either directly or indirectly (through getLock).  But get apparently does not.  This can result in returning an incorrect empty result instead of a WrongRegionException.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-4334) HRegion.get never validates row

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

Ted Yu commented on HBASE-4334:
-------------------------------

Usually shutdown hook should exit after certain time.
It would be helpful to know what processes don't exit after prolonged period of time.
Patch v3 looks good.
                
> HRegion.get never validates row
> -------------------------------
>
>                 Key: HBASE-4334
>                 URL: https://issues.apache.org/jira/browse/HBASE-4334
>             Project: HBase
>          Issue Type: Bug
>          Components: regionserver
>    Affects Versions: 0.90.4
>            Reporter: Joe Pallas
>            Assignee: Lars Hofhansl
>             Fix For: 0.92.0
>
>         Attachments: 4334-v2.txt, 4334-v3.txt, 4334.txt
>
>
> If a client gets confused (possibly by a hole in .META., see HBASE-4333), it may send a request to the wrong region.  Paths through put, delete, incrementColumnValue, and checkAndMutate all call checkRow either directly or indirectly (through getLock).  But get apparently does not.  This can result in returning an incorrect empty result instead of a WrongRegionException.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HBASE-4334) HRegion.get never validates row

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

Lars Hofhansl updated HBASE-4334:
---------------------------------

    Fix Version/s: 0.92.0
    
> HRegion.get never validates row
> -------------------------------
>
>                 Key: HBASE-4334
>                 URL: https://issues.apache.org/jira/browse/HBASE-4334
>             Project: HBase
>          Issue Type: Bug
>          Components: regionserver
>    Affects Versions: 0.90.4
>            Reporter: Joe Pallas
>            Assignee: Lars Hofhansl
>             Fix For: 0.92.0
>
>
> If a client gets confused (possibly by a hole in .META., see HBASE-4333), it may send a request to the wrong region.  Paths through put, delete, incrementColumnValue, and checkAndMutate all call checkRow either directly or indirectly (through getLock).  But get apparently does not.  This can result in returning an incorrect empty result instead of a WrongRegionException.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-4334) HRegion.get never validates row

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

Ted Yu commented on HBASE-4334:
-------------------------------

+1 on option 3 above. 
                
> HRegion.get never validates row
> -------------------------------
>
>                 Key: HBASE-4334
>                 URL: https://issues.apache.org/jira/browse/HBASE-4334
>             Project: HBase
>          Issue Type: Bug
>          Components: regionserver
>    Affects Versions: 0.90.4
>            Reporter: Joe Pallas
>            Assignee: Lars Hofhansl
>             Fix For: 0.92.0
>
>         Attachments: 4334-v2.txt, 4334.txt
>
>
> If a client gets confused (possibly by a hole in .META., see HBASE-4333), it may send a request to the wrong region.  Paths through put, delete, incrementColumnValue, and checkAndMutate all call checkRow either directly or indirectly (through getLock).  But get apparently does not.  This can result in returning an incorrect empty result instead of a WrongRegionException.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-4334) HRegion.get never validates row

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

Lars Hofhansl commented on HBASE-4334:
--------------------------------------

Actually it looks like only a single test was misbehaving... Fixed that. Now.
Will run the whole suite and then post the new patch.
                
> HRegion.get never validates row
> -------------------------------
>
>                 Key: HBASE-4334
>                 URL: https://issues.apache.org/jira/browse/HBASE-4334
>             Project: HBase
>          Issue Type: Bug
>          Components: regionserver
>    Affects Versions: 0.90.4
>            Reporter: Joe Pallas
>            Assignee: Lars Hofhansl
>             Fix For: 0.92.0
>
>         Attachments: 4334.txt
>
>
> If a client gets confused (possibly by a hole in .META., see HBASE-4333), it may send a request to the wrong region.  Paths through put, delete, incrementColumnValue, and checkAndMutate all call checkRow either directly or indirectly (through getLock).  But get apparently does not.  This can result in returning an incorrect empty result instead of a WrongRegionException.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HBASE-4334) HRegion.get never validates row

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

stack updated HBASE-4334:
-------------------------

    Resolution: Fixed
        Status: Resolved  (was: Patch Available)

Resolving.  Was applied to 0.92 branch and to trunk.  Thanks Lars.
                
> HRegion.get never validates row
> -------------------------------
>
>                 Key: HBASE-4334
>                 URL: https://issues.apache.org/jira/browse/HBASE-4334
>             Project: HBase
>          Issue Type: Bug
>          Components: regionserver
>    Affects Versions: 0.90.4
>            Reporter: Joe Pallas
>            Assignee: Lars Hofhansl
>             Fix For: 0.92.0
>
>         Attachments: 4334-v2.txt, 4334-v3.txt, 4334.txt
>
>
> If a client gets confused (possibly by a hole in .META., see HBASE-4333), it may send a request to the wrong region.  Paths through put, delete, incrementColumnValue, and checkAndMutate all call checkRow either directly or indirectly (through getLock).  But get apparently does not.  This can result in returning an incorrect empty result instead of a WrongRegionException.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-4334) HRegion.get never validates row

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

stack commented on HBASE-4334:
------------------------------

Sounds good Lars.  I bet that this bubbles up a bunch of complaints, complaints that are legit but that we just rode over clueless in the past.
                
> HRegion.get never validates row
> -------------------------------
>
>                 Key: HBASE-4334
>                 URL: https://issues.apache.org/jira/browse/HBASE-4334
>             Project: HBase
>          Issue Type: Bug
>          Components: regionserver
>    Affects Versions: 0.90.4
>            Reporter: Joe Pallas
>            Assignee: Lars Hofhansl
>             Fix For: 0.92.0
>
>
> If a client gets confused (possibly by a hole in .META., see HBASE-4333), it may send a request to the wrong region.  Paths through put, delete, incrementColumnValue, and checkAndMutate all call checkRow either directly or indirectly (through getLock).  But get apparently does not.  This can result in returning an incorrect empty result instead of a WrongRegionException.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-4334) HRegion.get never validates row

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

Lars Hofhansl commented on HBASE-4334:
--------------------------------------

I think the best way here is to check the startRow in HRegion.getScanner(...) that would cover gets and scans. No scan can reach a region server without the startRow set.
                
> HRegion.get never validates row
> -------------------------------
>
>                 Key: HBASE-4334
>                 URL: https://issues.apache.org/jira/browse/HBASE-4334
>             Project: HBase
>          Issue Type: Bug
>          Components: regionserver
>    Affects Versions: 0.90.4
>            Reporter: Joe Pallas
>            Assignee: Lars Hofhansl
>             Fix For: 0.92.0
>
>
> If a client gets confused (possibly by a hole in .META., see HBASE-4333), it may send a request to the wrong region.  Paths through put, delete, incrementColumnValue, and checkAndMutate all call checkRow either directly or indirectly (through getLock).  But get apparently does not.  This can result in returning an incorrect empty result instead of a WrongRegionException.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HBASE-4334) HRegion.get never validates row

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

stack updated HBASE-4334:
-------------------------

    Hadoop Flags: Reviewed
          Status: Patch Available  (was: Open)

+1 on patch
                
> HRegion.get never validates row
> -------------------------------
>
>                 Key: HBASE-4334
>                 URL: https://issues.apache.org/jira/browse/HBASE-4334
>             Project: HBase
>          Issue Type: Bug
>          Components: regionserver
>    Affects Versions: 0.90.4
>            Reporter: Joe Pallas
>            Assignee: Lars Hofhansl
>             Fix For: 0.92.0
>
>         Attachments: 4334-v2.txt, 4334-v3.txt, 4334.txt
>
>
> If a client gets confused (possibly by a hole in .META., see HBASE-4333), it may send a request to the wrong region.  Paths through put, delete, incrementColumnValue, and checkAndMutate all call checkRow either directly or indirectly (through getLock).  But get apparently does not.  This can result in returning an incorrect empty result instead of a WrongRegionException.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HBASE-4334) HRegion.get never validates row

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

Lars Hofhansl updated HBASE-4334:
---------------------------------

    Attachment: 4334.txt

Simple patch with a simple test.
Not happy that tests call into HRegion with Scan without startKey set. C'est la vie.
                
> HRegion.get never validates row
> -------------------------------
>
>                 Key: HBASE-4334
>                 URL: https://issues.apache.org/jira/browse/HBASE-4334
>             Project: HBase
>          Issue Type: Bug
>          Components: regionserver
>    Affects Versions: 0.90.4
>            Reporter: Joe Pallas
>            Assignee: Lars Hofhansl
>             Fix For: 0.92.0
>
>         Attachments: 4334.txt
>
>
> If a client gets confused (possibly by a hole in .META., see HBASE-4333), it may send a request to the wrong region.  Paths through put, delete, incrementColumnValue, and checkAndMutate all call checkRow either directly or indirectly (through getLock).  But get apparently does not.  This can result in returning an incorrect empty result instead of a WrongRegionException.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HBASE-4334) HRegion.get never validates row

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

Lars Hofhansl updated HBASE-4334:
---------------------------------

    Attachment: 4334-v2.txt

New patch... Running tests now.
                
> HRegion.get never validates row
> -------------------------------
>
>                 Key: HBASE-4334
>                 URL: https://issues.apache.org/jira/browse/HBASE-4334
>             Project: HBase
>          Issue Type: Bug
>          Components: regionserver
>    Affects Versions: 0.90.4
>            Reporter: Joe Pallas
>            Assignee: Lars Hofhansl
>             Fix For: 0.92.0
>
>         Attachments: 4334-v2.txt, 4334.txt
>
>
> If a client gets confused (possibly by a hole in .META., see HBASE-4333), it may send a request to the wrong region.  Paths through put, delete, incrementColumnValue, and checkAndMutate all call checkRow either directly or indirectly (through getLock).  But get apparently does not.  This can result in returning an incorrect empty result instead of a WrongRegionException.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-4334) HRegion.get never validates row

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

Hudson commented on HBASE-4334:
-------------------------------

Integrated in HBase-0.92 #41 (See [https://builds.apache.org/job/HBase-0.92/41/])
    HBASE-4334 HRegion.get never validates row (Lars H)

tedyu : 
Files : 
* /hbase/branches/0.92/CHANGES.txt
* /hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
* /hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
* /hbase/branches/0.92/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegion.java

                
> HRegion.get never validates row
> -------------------------------
>
>                 Key: HBASE-4334
>                 URL: https://issues.apache.org/jira/browse/HBASE-4334
>             Project: HBase
>          Issue Type: Bug
>          Components: regionserver
>    Affects Versions: 0.90.4
>            Reporter: Joe Pallas
>            Assignee: Lars Hofhansl
>             Fix For: 0.92.0
>
>         Attachments: 4334-v2.txt, 4334-v3.txt, 4334.txt
>
>
> If a client gets confused (possibly by a hole in .META., see HBASE-4333), it may send a request to the wrong region.  Paths through put, delete, incrementColumnValue, and checkAndMutate all call checkRow either directly or indirectly (through getLock).  But get apparently does not.  This can result in returning an incorrect empty result instead of a WrongRegionException.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HBASE-4334) HRegion.get never validates row

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

Lars Hofhansl updated HBASE-4334:
---------------------------------

    Attachment: 4334-v3.txt

This is the change.
                
> HRegion.get never validates row
> -------------------------------
>
>                 Key: HBASE-4334
>                 URL: https://issues.apache.org/jira/browse/HBASE-4334
>             Project: HBase
>          Issue Type: Bug
>          Components: regionserver
>    Affects Versions: 0.90.4
>            Reporter: Joe Pallas
>            Assignee: Lars Hofhansl
>             Fix For: 0.92.0
>
>         Attachments: 4334-v2.txt, 4334-v3.txt, 4334.txt
>
>
> If a client gets confused (possibly by a hole in .META., see HBASE-4333), it may send a request to the wrong region.  Paths through put, delete, incrementColumnValue, and checkAndMutate all call checkRow either directly or indirectly (through getLock).  But get apparently does not.  This can result in returning an incorrect empty result instead of a WrongRegionException.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-4334) HRegion.get never validates row

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

stack commented on HBASE-4334:
------------------------------

This bit looks strange to me Lars:

{code}
+    // start row can be empty in tests, so allow for that
+    byte[] startRow = scan.getStartRow();
+    if (startRow != null && !Bytes.equals(startRow, HConstants.EMPTY_START_ROW)) {
{code}

Its like tests get dispensation.  Should we fix the tests?

Otherwise patch looks good to me.
                
> HRegion.get never validates row
> -------------------------------
>
>                 Key: HBASE-4334
>                 URL: https://issues.apache.org/jira/browse/HBASE-4334
>             Project: HBase
>          Issue Type: Bug
>          Components: regionserver
>    Affects Versions: 0.90.4
>            Reporter: Joe Pallas
>            Assignee: Lars Hofhansl
>             Fix For: 0.92.0
>
>         Attachments: 4334.txt
>
>
> If a client gets confused (possibly by a hole in .META., see HBASE-4333), it may send a request to the wrong region.  Paths through put, delete, incrementColumnValue, and checkAndMutate all call checkRow either directly or indirectly (through getLock).  But get apparently does not.  This can result in returning an incorrect empty result instead of a WrongRegionException.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira