summaryrefslogtreecommitdiff
path: root/src/mongo/s/write_ops/batch_write_exec.h
diff options
context:
space:
mode:
authorJanna Golden <janna.golden@mongodb.com>2019-12-17 16:41:48 +0000
committerevergreen <evergreen@mongodb.com>2019-12-17 16:41:48 +0000
commit1fe9dfb1ade548488831bf29cdcc57636e5e3b8a (patch)
tree0e005b396049b1c246b73cde868dba1dac9582cc /src/mongo/s/write_ops/batch_write_exec.h
parent726a916f2e0072169878dd36efd0cd5d6964e12e (diff)
downloadmongo-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.h3
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