diff options
author | Blake Oler <blake.oler@mongodb.com> | 2021-05-24 18:21:20 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-06-01 21:11:28 +0000 |
commit | 83fea20e50872158c620b0eef720a77a173f176a (patch) | |
tree | 382ba266db43d4d860434dd261302a2e67650065 /src/mongo/db/s/resharding/resharding_oplog_fetcher_test.cpp | |
parent | f5920f892b6cc0572140be6b81babf8bf4419278 (diff) | |
download | mongo-83fea20e50872158c620b0eef720a77a173f176a.tar.gz |
SERVER-57153 Support co-existing donors/recipients in resharding metrics
Diffstat (limited to 'src/mongo/db/s/resharding/resharding_oplog_fetcher_test.cpp')
-rw-r--r-- | src/mongo/db/s/resharding/resharding_oplog_fetcher_test.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mongo/db/s/resharding/resharding_oplog_fetcher_test.cpp b/src/mongo/db/s/resharding/resharding_oplog_fetcher_test.cpp index 6d66874a296..958ac588789 100644 --- a/src/mongo/db/s/resharding/resharding_oplog_fetcher_test.cpp +++ b/src/mongo/db/s/resharding/resharding_oplog_fetcher_test.cpp @@ -98,7 +98,8 @@ public: // Initialize ReshardingMetrics to a recipient state compatible with fetching. _metrics = std::make_unique<ReshardingMetrics>(_svcCtx); - _metrics->onStart(_svcCtx->getFastClockSource()->now()); + _metrics->onStart(ReshardingMetrics::Role::kRecipient, + _svcCtx->getFastClockSource()->now()); _metrics->setRecipientState(RecipientStateEnum::kCloning); for (const auto& shardId : kTwoShardIdList) { @@ -314,8 +315,7 @@ public: long long metricsFetchedCount() const { BSONObjBuilder bob; - _metrics->serializeCurrentOpMetrics(&bob, - ReshardingMetrics::ReporterOptions::Role::kRecipient); + _metrics->serializeCurrentOpMetrics(&bob, ReshardingMetrics::Role::kRecipient); return bob.obj()["oplogEntriesFetched"_sd].Long(); } |