mirror of
https://github.com/mongodb/mongo.git
synced 2024-12-01 09:32:32 +01:00
SERVER-47738 Don't include CatalogCache blocked operation metrics on mongod
This commit is contained in:
parent
3cc55fa1d0
commit
341e556928
@ -47,6 +47,7 @@
|
||||
#include "mongo/s/client/shard_registry.h"
|
||||
#include "mongo/s/database_version_helpers.h"
|
||||
#include "mongo/s/grid.h"
|
||||
#include "mongo/s/is_mongos.h"
|
||||
#include "mongo/s/mongos_server_parameters_gen.h"
|
||||
#include "mongo/s/stale_exception.h"
|
||||
#include "mongo/util/concurrency/with_lock.h"
|
||||
@ -582,7 +583,7 @@ void CatalogCache::report(BSONObjBuilder* builder) const {
|
||||
|
||||
void CatalogCache::checkAndRecordOperationBlockedByRefresh(OperationContext* opCtx,
|
||||
mongo::LogicalOp opType) {
|
||||
if (!operationBlockedBehindCatalogCacheRefresh(opCtx)) {
|
||||
if (!isMongos() || !operationBlockedBehindCatalogCacheRefresh(opCtx)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -923,11 +924,12 @@ void CatalogCache::Stats::report(BSONObjBuilder* builder) const {
|
||||
|
||||
builder->append("countFailedRefreshes", countFailedRefreshes.load());
|
||||
|
||||
if (isMongos()) {
|
||||
BSONObjBuilder operationsBlockedByRefreshBuilder(
|
||||
builder->subobjStart("operationsBlockedByRefresh"));
|
||||
|
||||
operationsBlockedByRefreshBuilder.append("countAllOperations",
|
||||
operationsBlockedByRefresh.countAllOperations.load());
|
||||
operationsBlockedByRefreshBuilder.append(
|
||||
"countAllOperations", operationsBlockedByRefresh.countAllOperations.load());
|
||||
operationsBlockedByRefreshBuilder.append("countInserts",
|
||||
operationsBlockedByRefresh.countInserts.load());
|
||||
operationsBlockedByRefreshBuilder.append("countQueries",
|
||||
@ -940,6 +942,7 @@ void CatalogCache::Stats::report(BSONObjBuilder* builder) const {
|
||||
operationsBlockedByRefresh.countCommands.load());
|
||||
|
||||
operationsBlockedByRefreshBuilder.done();
|
||||
}
|
||||
}
|
||||
|
||||
CachedDatabaseInfo::CachedDatabaseInfo(DatabaseType dbt, std::shared_ptr<Shard> primaryShard)
|
||||
|
Loading…
Reference in New Issue
Block a user