Merge pull request #46153 from lxbsz/wip-54411-1

client: force send global open_files/metadata metrics

 Reviewed-by: Venky Shankar <vshankar@redhat.com>
This commit is contained in:
Venky Shankar 2022-05-14 15:11:17 +05:30 committed by GitHub
commit 8beaa5e5db
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6834,7 +6834,8 @@ void Client::collect_and_send_global_metrics() {
}
// metadata latency
if (session->mds_metric_flags.test(CLIENT_METRIC_TYPE_METADATA_LATENCY)) {
if (_collect_and_send_global_metrics ||
session->mds_metric_flags.test(CLIENT_METRIC_TYPE_METADATA_LATENCY)) {
metric = ClientMetricMessage(MetadataLatencyPayload(logger->tget(l_c_lat),
logger->tget(l_c_md_avg),
logger->get(l_c_md_sqsum),
@ -6859,7 +6860,8 @@ void Client::collect_and_send_global_metrics() {
}
// opened files
if (session->mds_metric_flags.test(CLIENT_METRIC_TYPE_OPENED_FILES)) {
if (_collect_and_send_global_metrics ||
session->mds_metric_flags.test(CLIENT_METRIC_TYPE_OPENED_FILES)) {
auto [opened_files, total_inodes] = get_opened_files_rates();
metric = ClientMetricMessage(OpenedFilesPayload(opened_files, total_inodes));
message.push_back(metric);