summaryrefslogtreecommitdiff
path: root/src/mongo/db/repl
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/repl')
-rw-r--r--src/mongo/db/repl/SConscript1
-rw-r--r--src/mongo/db/repl/collection_cloner.cpp22
-rw-r--r--src/mongo/db/repl/collection_cloner.h2
3 files changed, 13 insertions, 12 deletions
diff --git a/src/mongo/db/repl/SConscript b/src/mongo/db/repl/SConscript
index bcb0da9d789..fb0890b87a5 100644
--- a/src/mongo/db/repl/SConscript
+++ b/src/mongo/db/repl/SConscript
@@ -1241,7 +1241,6 @@ env.Library(
'$BUILD_DIR/mongo/executor/task_executor_interface',
'$BUILD_DIR/mongo/rpc/command_status',
'$BUILD_DIR/mongo/s/query/async_results_merger',
- '$BUILD_DIR/mongo/s/query/cluster_client_cursor',
'$BUILD_DIR/mongo/util/progress_meter',
],
)
diff --git a/src/mongo/db/repl/collection_cloner.cpp b/src/mongo/db/repl/collection_cloner.cpp
index 773f54a0b8b..8aee68a4c58 100644
--- a/src/mongo/db/repl/collection_cloner.cpp
+++ b/src/mongo/db/repl/collection_cloner.cpp
@@ -43,7 +43,6 @@
#include "mongo/db/repl/storage_interface_mock.h"
#include "mongo/db/server_parameters.h"
#include "mongo/rpc/get_status_from_command_result.h"
-#include "mongo/s/query/cluster_client_cursor_params.h"
#include "mongo/util/assert_util.h"
#include "mongo/util/destructor_guard.h"
#include "mongo/util/fail_point_service.h"
@@ -613,20 +612,25 @@ void CollectionCloner::_establishCollectionCursorsCallback(const RemoteCommandCa
<< " cursors established.";
// Initialize the 'AsyncResultsMerger'(ARM).
- std::vector<ClusterClientCursorParams::RemoteCursor> remoteCursors;
+ std::vector<RemoteCursor> remoteCursors;
for (auto&& cursorResponse : cursorResponses) {
// A placeholder 'ShardId' is used until the ARM is made less sharding specific.
- remoteCursors.emplace_back(
- ShardId("CollectionClonerSyncSource"), _source, std::move(cursorResponse));
+ remoteCursors.emplace_back();
+ auto& newCursor = remoteCursors.back();
+ newCursor.setShardId("CollectionClonerSyncSource");
+ newCursor.setHostAndPort(_source);
+ newCursor.setCursorResponse(std::move(cursorResponse));
}
- _clusterClientCursorParams = stdx::make_unique<ClusterClientCursorParams>(_sourceNss);
- _clusterClientCursorParams->remotes = std::move(remoteCursors);
- if (_collectionCloningBatchSize > 0)
- _clusterClientCursorParams->batchSize = _collectionCloningBatchSize;
+ AsyncResultsMergerParams armParams;
+ armParams.setNss(_sourceNss);
+ armParams.setRemotes(std::move(remoteCursors));
+ if (_collectionCloningBatchSize > 0) {
+ armParams.setBatchSize(_collectionCloningBatchSize);
+ }
Client::initThreadIfNotAlready();
_arm = stdx::make_unique<AsyncResultsMerger>(
- cc().getOperationContext(), _executor, _clusterClientCursorParams.get());
+ cc().getOperationContext(), _executor, std::move(armParams));
// This completion guard invokes _finishCallback on destruction.
auto cancelRemainingWorkInLock = [this]() { _cancelRemainingWork_inlock(); };
diff --git a/src/mongo/db/repl/collection_cloner.h b/src/mongo/db/repl/collection_cloner.h
index e79258e3734..d97c5c0048f 100644
--- a/src/mongo/db/repl/collection_cloner.h
+++ b/src/mongo/db/repl/collection_cloner.h
@@ -301,8 +301,6 @@ private:
const int _maxNumClonerCursors;
// (M) Component responsible for fetching the documents from the collection cloner cursor(s).
std::unique_ptr<AsyncResultsMerger> _arm;
- // (R) The cursor parameters used by the 'AsyncResultsMerger'.
- std::unique_ptr<ClusterClientCursorParams> _clusterClientCursorParams;
// (M) The event handle for the 'kill' event of the 'AsyncResultsMerger'.
executor::TaskExecutor::EventHandle _killArmHandle;