Skip to content
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -552,6 +552,10 @@ public void incrMetaCacheHit() {
metaCacheHits.inc();
}

public long getMetaCacheHits() {
return metaCacheHits.getCount();
}

/** Increment the number of meta cache misses. */
public void incrMetaCacheMiss() {
metaCacheMisses.inc();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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());
} catch (IOException ex) {
// Only keep track of the last exception that updated the meta cache
if (ClientExceptionsUtil.isMetaClearingException(ex) || success) {
Expand Down