diff options
author | Janna Golden <janna.golden@mongodb.com> | 2019-12-17 16:41:48 +0000 |
---|---|---|
committer | evergreen <evergreen@mongodb.com> | 2019-12-17 16:41:48 +0000 |
commit | 1fe9dfb1ade548488831bf29cdcc57636e5e3b8a (patch) | |
tree | 0e005b396049b1c246b73cde868dba1dac9582cc /src/mongo/s/write_ops/batch_write_exec.h | |
parent | 726a916f2e0072169878dd36efd0cd5d6964e12e (diff) | |
download | mongo-1fe9dfb1ade548488831bf29cdcc57636e5e3b8a.tar.gz |
SERVER-43617 Add metrics on the mongos to indicate the number of shards targeted for CRUD and agg commands
Diffstat (limited to 'src/mongo/s/write_ops/batch_write_exec.h')
-rw-r--r-- | src/mongo/s/write_ops/batch_write_exec.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mongo/s/write_ops/batch_write_exec.h b/src/mongo/s/write_ops/batch_write_exec.h index c729561630a..9b6773ecb47 100644 --- a/src/mongo/s/write_ops/batch_write_exec.h +++ b/src/mongo/s/write_ops/batch_write_exec.h @@ -94,9 +94,11 @@ public: void noteWriteAt(const HostAndPort& host, repl::OpTime opTime, const OID& electionId); void noteTargetedShard(const ShardId& shardId); + void noteNumShardsOwningChunks(const int nShardsOwningChunks); const std::set<ShardId>& getTargetedShards() const; const HostOpTimeMap& getWriteOpTimes() const; + const boost::optional<int> getNumShardsOwningChunks() const; // Expose via helpers if this gets more complex @@ -114,6 +116,7 @@ public: private: std::set<ShardId> _targetedShards; HostOpTimeMap _writeOpTimes; + boost::optional<int> _numShardsOwningChunks; }; } // namespace mongo |