HBASE-25967 The readRequestsCount does not calculate when the outResu… (#3351)
* HBASE-25967 The readRequestsCount does not calculate when the outResults is empty Co-authored-by: Zheng Wang <wangzheng@apache.org>
This commit is contained in:
parent
7f7a293cb5
commit
329f0baa98
|
@ -270,11 +270,9 @@ class RegionScannerImpl implements RegionScanner, Shipper, RpcCallback {
|
|||
outResults.addAll(tmpList);
|
||||
}
|
||||
|
||||
if (!outResults.isEmpty()) {
|
||||
region.addReadRequestsCount(1);
|
||||
if (region.getMetrics() != null) {
|
||||
region.getMetrics().updateReadRequestCount();
|
||||
}
|
||||
region.addReadRequestsCount(1);
|
||||
if (region.getMetrics() != null) {
|
||||
region.getMetrics().updateReadRequestCount();
|
||||
}
|
||||
|
||||
// If the size limit was reached it means a partial Result is being returned. Returning a
|
||||
|
|
|
@ -142,7 +142,9 @@ public class TestTransitRegionStateProcedure {
|
|||
long openSeqNum2 = region2.getOpenSeqNum();
|
||||
// confirm that the region is successfully opened
|
||||
assertTrue(openSeqNum2 > openSeqNum);
|
||||
assertEquals(1, region2.getReadRequestsCount());
|
||||
// we check the available by scan after table created,
|
||||
// so the readRequestsCount should be 2 here
|
||||
assertEquals(2, region2.getReadRequestsCount());
|
||||
assertEquals(2, region2.getWriteRequestsCount());
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue