summaryrefslogtreecommitdiff
path: root/src/mongo/db/service_entry_point_mongod.cpp
diff options
context:
space:
mode:
authorBrett Nawrocki <brett.nawrocki@mongodb.com>2022-03-23 20:55:11 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-04-14 20:55:48 +0000
commit37deca965953bf21b38d5e3572e46e102b3badc6 (patch)
treed68d633aabc548905b7e9ac0c598d86a3c4ec729 /src/mongo/db/service_entry_point_mongod.cpp
parent576ea084ea887f3f6bd1dd1f8aa12c1af33487d1 (diff)
downloadmongo-37deca965953bf21b38d5e3572e46e102b3badc6.tar.gz
SERVER-64372 Add parity $currentOp resharding donor fields
Track and report the following fields in ShardingDataTransformInstanceMetrics for resharding $currentOp: countWritesDuringCriticalSection totalCriticalSectionTimeElapsedSecs
Diffstat (limited to 'src/mongo/db/service_entry_point_mongod.cpp')
-rw-r--r--src/mongo/db/service_entry_point_mongod.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mongo/db/service_entry_point_mongod.cpp b/src/mongo/db/service_entry_point_mongod.cpp
index 991a099b18b..df50322d6c2 100644
--- a/src/mongo/db/service_entry_point_mongod.cpp
+++ b/src/mongo/db/service_entry_point_mongod.cpp
@@ -41,6 +41,7 @@
#include "mongo/db/repl/replication_coordinator.h"
#include "mongo/db/repl/speculative_majority_read_info.h"
#include "mongo/db/s/operation_sharding_state.h"
+#include "mongo/db/s/resharding/resharding_metrics_helpers.h"
#include "mongo/db/s/scoped_operation_completion_sharding_actions.h"
#include "mongo/db/s/shard_filtering_metadata_refresh.h"
#include "mongo/db/s/sharding_state.h"
@@ -254,6 +255,11 @@ public:
.isOK();
}
+ void handleReshardingCriticalSectionMetrics(OperationContext* opCtx,
+ const StaleConfigInfo& se) const noexcept override {
+ resharding_metrics::onCriticalSectionError(opCtx, se);
+ }
+
// The refreshDatabase, refreshCollection, and refreshCatalogCache methods may have modified the
// locker state, in particular the flags which say if the operation took a write lock or shared
// lock. This will cause mongod to perhaps erroneously check for write concern when no writes