Alexander Komyagin created HBASE-30149:
------------------------------------------

             Summary: PrefixFilter and Range Scanning Bug for hbase::meta
                 Key: HBASE-30149
                 URL: https://issues.apache.org/jira/browse/HBASE-30149
             Project: HBase
          Issue Type: Bug
          Components: meta
    Affects Versions: 2.6.4, 2.6.2
            Reporter: Alexander Komyagin


Our database migration tool, [Dsync|https://github.com/adiom-data/dsync/], uses 
a query over hbase:meta to get all the regions for a table. We haven't had 
issues with Hbase 2.2 and 2.4, but while working with HBase 2.6.2 we noticed 
that queries on hbase:meta seem to be behaving weirdly:
{code:java}
// full scan starting with "test"; expecting to see two regions, and see both

hbase:013:0> scan 'hbase:meta', {STARTROW => 'test', STOPROW => 'test.'}
ROW                                                   COLUMN+CELL
 test                                                 column=table:state, 
timestamp=2026-05-07T17:11:01.333, value=\x08\x00
 test,,1778173914163.d8d8a3cdf6d466b32436d105524a3d3f column=info:regioninfo, 
timestamp=2026-05-07T17:11:55.625, value={ENCODED => 
d8d8a3cdf6d466b32436d105524a3d3f, NAME => 'test,,1778173914163.d8d8a3cdf6d466b3
 .                                                    2436d105524a3d3f.', 
STARTKEY => '', ENDKEY => 'm'}
 test,,1778173914163.d8d8a3cdf6d466b32436d105524a3d3f 
column=info:seqnumDuringOpen, timestamp=2026-05-07T17:11:55.625, 
value=\x00\x00\x00\x00\x00\x00\x00\x0E
 .
 test,,1778173914163.d8d8a3cdf6d466b32436d105524a3d3f column=info:server, 
timestamp=2026-05-07T17:11:55.625, 
value=ip-172-31-3-98.us-west-1.compute.internal:16020
 .
 test,,1778173914163.d8d8a3cdf6d466b32436d105524a3d3f 
column=info:serverstartcode, timestamp=2026-05-07T17:11:55.625, 
value=1778166817935
 .
 test,,1778173914163.d8d8a3cdf6d466b32436d105524a3d3f column=info:sn, 
timestamp=2026-05-07T17:11:55.376, 
value=ip-172-31-3-98.us-west-1.compute.internal,16020,1778166817935
 .
 test,,1778173914163.d8d8a3cdf6d466b32436d105524a3d3f column=info:state, 
timestamp=2026-05-07T17:11:55.625, value=OPEN
 .
 test,m,1778173914163.31c5b51c891bf4bc6254dbb281467dd column=info:regioninfo, 
timestamp=2026-05-07T17:12:36.658, value={ENCODED => 
31c5b51c891bf4bc6254dbb281467dd9, NAME => 'test,m,1778173914163.31c5b51c891bf4b
 9.                                                   c6254dbb281467dd9.', 
STARTKEY => 'm', ENDKEY => ''}
 test,m,1778173914163.31c5b51c891bf4bc6254dbb281467dd 
column=info:seqnumDuringOpen, timestamp=2026-05-07T17:12:36.658, 
value=\x00\x00\x00\x00\x00\x00\x00\x12
 9.
 test,m,1778173914163.31c5b51c891bf4bc6254dbb281467dd column=info:server, 
timestamp=2026-05-07T17:12:36.658, 
value=ip-172-31-3-159.us-west-1.compute.internal:16020
 9.
 test,m,1778173914163.31c5b51c891bf4bc6254dbb281467dd 
column=info:serverstartcode, timestamp=2026-05-07T17:12:36.658, 
value=1778166817665
 9.
 test,m,1778173914163.31c5b51c891bf4bc6254dbb281467dd column=info:sn, 
timestamp=2026-05-07T17:12:36.443, 
value=ip-172-31-3-159.us-west-1.compute.internal,16020,1778166817665
 9.
 test,m,1778173914163.31c5b51c891bf4bc6254dbb281467dd column=info:state, 
timestamp=2026-05-07T17:12:36.658, value=OPEN
 9.
3 row(s)
Took 0.0223 seconds {code}
{code:java}
// full scan starting with "test,"; expecting to see two regions, BUT see just 
one
hbase:007:0> scan 'hbase:meta', {STARTROW => 'test,', STOPROW => 'test.'} ROW 
COLUMN+CELL test,m,1778173914163.31c5b51c891bf4bc6254dbb281467dd 
column=info:regioninfo, timestamp=2026-05-07T17:12:36.658, value={ENCODED => 
31c5b51c891bf4bc6254dbb281467dd9, NAME => 'test,m,1778173914163.31c5b51c891bf4b 
9. c6254dbb281467dd9.', STARTKEY => 'm', ENDKEY => ''} 
test,m,1778173914163.31c5b51c891bf4bc6254dbb281467dd 
column=info:seqnumDuringOpen, timestamp=2026-05-07T17:12:36.658, 
value=\x00\x00\x00\x00\x00\x00\x00\x12 9. 
test,m,1778173914163.31c5b51c891bf4bc6254dbb281467dd column=info:server, 
timestamp=2026-05-07T17:12:36.658, 
value=ip-172-31-3-159.us-west-1.compute.internal:16020 9. 
test,m,1778173914163.31c5b51c891bf4bc6254dbb281467dd 
column=info:serverstartcode, timestamp=2026-05-07T17:12:36.658, 
value=1778166817665 9. test,m,1778173914163.31c5b51c891bf4bc6254dbb281467dd 
column=info:sn, timestamp=2026-05-07T17:12:36.443, 
value=ip-172-31-3-159.us-west-1.compute.internal,16020,1778166817665 9. 
test,m,1778173914163.31c5b51c891bf4bc6254dbb281467dd column=info:state, 
timestamp=2026-05-07T17:12:36.658, value=OPEN 9. 1 row(s) Took 0.0179 seconds
{code}
When starting the scan with "test," or doing a prefixFilter on "test,", records 
with row key "test,,..." (corresponding to the first region) are reliably 
missing. This appears to be exclusive to the metadata table - regular tables 
behave as expected.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to