You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "NihalJain (via GitHub)" <gi...@apache.org> on 2023/05/26 07:15:45 UTC

[GitHub] [hbase] NihalJain commented on a diff in pull request #5253: HBASE-27885 expose metaCacheHits in MetricsConnection

NihalJain commented on code in PR #5253:
URL: https://github.com/apache/hbase/pull/5253#discussion_r1206329195


##########
hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestMetaCache.java:
##########
@@ -253,6 +253,9 @@ public void testPreserveMetaCacheOnException() throws Exception {
           table.increment(increment);
           table.delete(delete);
           table.mutateRow(mutations);
+          // The value of the metaCacheHits counter is incremented by 6 in each round of the loop,
+          // and the first request will not hit cache
+          assertEquals(6 * i + 5, metrics.getMetaCacheHits());

Review Comment:
   Could we please do a metrics.getMetaCacheHits() for initial value before asserting (possibly current change may fail due to test case run order)? 
   Also, we can mention for 0th iteration there will be 5 hits + 1 cache miss in comments. 
   Could possibly add an assertion for cache miss as well.



-- 
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: issues-unsubscribe@hbase.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org