bbeaudreault commented on code in PR #5004:
URL: https://github.com/apache/hbase/pull/5004#discussion_r1095250497
##########
hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestMultiRespectsLimits.java:
##########
@@ -165,28 +179,43 @@ public void testBlockMultiLimits() throws Exception {
}
// Make sure that a flush happens
- try (final Admin admin = TEST_UTIL.getAdmin()) {
- admin.flush(tableName);
- TEST_UTIL.waitFor(60000, new Waiter.Predicate<Exception>() {
- @Override
- public boolean evaluate() throws Exception {
- return
regionServer.getRegions(tableName).get(0).getMaxFlushedSeqId() > 3;
- }
- });
- }
-
- List<Get> gets = new ArrayList<>(2);
- Get g0 = new Get(row);
- g0.addColumn(FAMILY, cols[0]);
+ flush(regionServer, tableName);
+
+ List<Get> gets = new ArrayList<>(4);
+ // This get returns nothing since the filter doesn't match. Filtered cells
still retain
+ // blocks, and this is a full row scan of both blocks. This equals 100
bytes so we should
+ // throw a multiResponseTooLarge after this get if we are counting
filtered cells correctly.
+ Get g0 = new Get(row).addFamily(FAMILY).setFilter(
+ new QualifierFilter(CompareOperator.EQUAL, new
BinaryComparator(Bytes.toBytes("sdf"))));
gets.add(g0);
+ // g1 and g2 each count the first 55 byte block, so we end up with block
size of 110
+ // after g2 and throw a multiResponseTooLarge before g3
+ Get g1 = new Get(row);
+ g1.addColumn(FAMILY, cols[0]);
+ gets.add(g1);
+
Get g2 = new Get(row);
g2.addColumn(FAMILY, cols[3]);
gets.add(g2);
Review Comment:
old method would have returned these 2 gets in the same rpc, because of
lastBlock tracking (both columns in the same block). We could add that
functionality back with a change like
[this](https://github.com/apache/hbase/commit/126afec6846d08ce9e9efd6604d2f4ae7f5bb9cb)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]