HBASE-26797 HBase 1.x clients will choke on rep_barrier rows when scanning hbase 2.x meta (#4161)

Signed-off-by: Andrew Purtell <apurtell@apache.org>
This commit is contained in:
Bryan Beaudreault 2022-03-04 17:00:59 -05:00 committed by GitHub
parent 7bb40b384c
commit acc729939a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 0 deletions

View File

@ -1287,6 +1287,11 @@ class ConnectionManager {
s.setReversed(true);
s.withStartRow(metaKey);
// Adding a filter on CATALOG_FAMILY is necessary for compatibility
// with hbase 2.x and beyond, which adds additional column families.
// See HBASE-26797
s.addFamily(HConstants.CATALOG_FAMILY);
if (this.useMetaReplicas) {
s.setConsistency(Consistency.TIMELINE);
}

View File

@ -220,6 +220,10 @@ public class MetaScanner {
throws IOException {
byte[] searchRow = HRegionInfo.createRegionName(userTableName, row, HConstants.NINES, false);
Scan scan = Scan.createGetClosestRowOrBeforeReverseScan(searchRow);
// Adding a filter on CATALOG_FAMILY is necessary for compatibility
// with hbase 2.x and beyond, which adds additional column families.
// See HBASE-26797
scan.addFamily(HConstants.CATALOG_FAMILY);
if (useMetaReplicas) {
scan.setConsistency(Consistency.TIMELINE);
}