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 GitHub
parent 4d29ef8bb4
commit 53b4b4e941
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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);
}
}