summaryrefslogtreecommitdiff
path: root/src/mongo/db/s/migration_chunk_cloner_source_legacy_commands.cpp
diff options
context:
space:
mode:
authorGreg McKeon <greg.mckeon@mongodb.com>2017-09-27 14:32:40 -0400
committerGreg McKeon <greg.mckeon@mongodb.com>2017-09-27 14:32:40 -0400
commit522f7f7d36a4a71059dd2d5219c2a0f074dfd0a1 (patch)
tree89a030c9bfca2b0cab00dbd5e2051dc550d43cd1 /src/mongo/db/s/migration_chunk_cloner_source_legacy_commands.cpp
parent790cd20518f4aeef78780293b15842c32e7e4b55 (diff)
downloadmongo-522f7f7d36a4a71059dd2d5219c2a0f074dfd0a1.tar.gz
Revert "SERVER-30894 Implement command for transferring session information during migration"
This reverts commit 85d9721c00d7020af78fe60453f8362380fe697d.
Diffstat (limited to 'src/mongo/db/s/migration_chunk_cloner_source_legacy_commands.cpp')
-rw-r--r--src/mongo/db/s/migration_chunk_cloner_source_legacy_commands.cpp52
1 files changed, 0 insertions, 52 deletions
diff --git a/src/mongo/db/s/migration_chunk_cloner_source_legacy_commands.cpp b/src/mongo/db/s/migration_chunk_cloner_source_legacy_commands.cpp
index d42c6bdaa99..9e3e83774ee 100644
--- a/src/mongo/db/s/migration_chunk_cloner_source_legacy_commands.cpp
+++ b/src/mongo/db/s/migration_chunk_cloner_source_legacy_commands.cpp
@@ -216,57 +216,5 @@ public:
} transferModsCommand;
-/**
- * Command for extracting the oplog entries that needs to be migrated for the given migration
- * session id.
- * Note: this command is not stateless. Calling this command has a side-effect of gradually
- * depleting the buffer that contains the oplog entries to be transfered.
- */
-class MigrateSessionCommand : public BasicCommand {
-public:
- MigrateSessionCommand() : BasicCommand("_getNextSessionMods") {}
-
- void help(std::stringstream& h) const {
- h << "internal";
- }
-
- virtual bool supportsWriteConcern(const BSONObj& cmd) const override {
- return false;
- }
-
- virtual bool slaveOk() const {
- return false;
- }
-
- virtual bool adminOnly() const {
- return true;
- }
-
- virtual void addRequiredPrivileges(const std::string& dbname,
- const BSONObj& cmdObj,
- std::vector<Privilege>* out) {
- ActionSet actions;
- actions.addAction(ActionType::internal);
- out->push_back(Privilege(ResourcePattern::forClusterResource(), actions));
- }
-
- bool run(OperationContext* opCtx,
- const std::string&,
- const BSONObj& cmdObj,
- BSONObjBuilder& result) {
- const MigrationSessionId migrationSessionId(
- uassertStatusOK(MigrationSessionId::extractFromBSON(cmdObj)));
-
- BSONArrayBuilder arrBuilder;
-
- AutoGetActiveCloner autoCloner(opCtx, migrationSessionId);
- autoCloner.getCloner()->nextSessionMigrationBatch(opCtx, &arrBuilder);
-
- result.appendArray("oplog", arrBuilder.arr());
- return true;
- }
-
-} migrateSessionCommand;
-
} // namespace
} // namespace mongo