diff options
author | Brett Nawrocki <brett.nawrocki@mongodb.com> | 2022-03-23 20:55:11 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-04-14 20:55:48 +0000 |
commit | 37deca965953bf21b38d5e3572e46e102b3badc6 (patch) | |
tree | d68d633aabc548905b7e9ac0c598d86a3c4ec729 /src/mongo/db/service_entry_point_mongod.cpp | |
parent | 576ea084ea887f3f6bd1dd1f8aa12c1af33487d1 (diff) | |
download | mongo-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.cpp | 6 |
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 |