HBASE-27494: Fix missing meta cache dropping exception metrics (#4902)

Signed-off-by: Bryan Beaudreault <bbeaudreault@apache.org>
This commit is contained in:
Bri Augenreich 2022-11-30 13:03:19 -05:00 committed by Bryan Beaudreault
parent 376f7b774c
commit 8b5fe81c03
1 changed files with 4 additions and 0 deletions

View File

@ -912,6 +912,10 @@ class AsyncRequestFutureImpl<CResult> implements AsyncRequestFuture {
if (ClientExceptionsUtil.isMetaClearingException(regionException)) {
// We want to make sure to clear the cache in case there were location-related exceptions.
// We don't to clear the cache for every possible exception that comes through, however.
MetricsConnection metrics = asyncProcess.connection.getConnectionMetrics();
if (metrics != null) {
metrics.incrCacheDroppingExceptions(regionException);
}
asyncProcess.connection.clearCaches(server);
}
}