diff options
author | Mathias Stearn <mathias@10gen.com> | 2014-05-13 12:47:59 -0400 |
---|---|---|
committer | Mathias Stearn <mathias@10gen.com> | 2014-05-14 14:14:44 -0400 |
commit | e3885bae0383148dc36274b04662235f978de483 (patch) | |
tree | 0432f3060a95c1e7ff95223c80c6602836ed5b53 /src/mongo/s/d_migrate.cpp | |
parent | 6378da06b637dbf86f916274c8f0457d925af6a9 (diff) | |
download | mongo-e3885bae0383148dc36274b04662235f978de483.tar.gz |
SERVER-13641 Unify Command::newRun into run
This is the result of the following seds and a few manual fixups, including
removing the old run() and fixing the comments.
git grep -l '\<run(const' | xargs sed -si -e 's/\brun(const/newRun(TransactionExperiment* txn, const/'
git grep -l '\<run( const' | xargs sed -si -e 's/\brun( const/newRun(TransactionExperiment* txn, const/'
git grep -l '\<newRun(' | xargs sed -si -e 's/\bnewRun(/run(/'
Diffstat (limited to 'src/mongo/s/d_migrate.cpp')
-rw-r--r-- | src/mongo/s/d_migrate.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/mongo/s/d_migrate.cpp b/src/mongo/s/d_migrate.cpp index 5a98b4825f0..18dd8e28823 100644 --- a/src/mongo/s/d_migrate.cpp +++ b/src/mongo/s/d_migrate.cpp @@ -711,7 +711,7 @@ namespace mongo { actions.addAction(ActionType::internal); out->push_back(Privilege(ResourcePattern::forClusterResource(), actions)); } - bool run(const string& , BSONObj& cmdObj, int, string& errmsg, BSONObjBuilder& result, bool) { + bool run(TransactionExperiment* txn, const string& , BSONObj& cmdObj, int, string& errmsg, BSONObjBuilder& result, bool) { return migrateFromStatus.transferMods( errmsg, result ); } } transferModsCommand; @@ -728,7 +728,7 @@ namespace mongo { actions.addAction(ActionType::internal); out->push_back(Privilege(ResourcePattern::forClusterResource(), actions)); } - bool run(const string& , BSONObj& cmdObj, int, string& errmsg, BSONObjBuilder& result, bool) { + bool run(TransactionExperiment* txn, const string& , BSONObj& cmdObj, int, string& errmsg, BSONObjBuilder& result, bool) { return migrateFromStatus.clone( errmsg, result ); } } initialCloneCommand; @@ -771,7 +771,7 @@ namespace mongo { return parseNsFullyQualified(dbname, cmdObj); } - bool newRun(TransactionExperiment* txn, const string& dbname, BSONObj& cmdObj, int, string& errmsg, BSONObjBuilder& result, bool) { + bool run(TransactionExperiment* txn, const string& dbname, BSONObj& cmdObj, int, string& errmsg, BSONObjBuilder& result, bool) { // 1. parse options // 2. make sure my view is complete and lock // 3. start migrate @@ -2156,7 +2156,7 @@ namespace mongo { actions.addAction(ActionType::internal); out->push_back(Privilege(ResourcePattern::forClusterResource(), actions)); } - bool run(const string& , BSONObj& cmdObj, int, string& errmsg, BSONObjBuilder& result, bool) { + bool run(TransactionExperiment* txn, const string& , BSONObj& cmdObj, int, string& errmsg, BSONObjBuilder& result, bool) { // Active state of TO-side migrations (MigrateStatus) is serialized by distributed // collection lock. @@ -2255,7 +2255,7 @@ namespace mongo { actions.addAction(ActionType::internal); out->push_back(Privilege(ResourcePattern::forClusterResource(), actions)); } - bool run(const string& , BSONObj& cmdObj, int, string& errmsg, BSONObjBuilder& result, bool) { + bool run(TransactionExperiment* txn, const string& , BSONObj& cmdObj, int, string& errmsg, BSONObjBuilder& result, bool) { migrateStatus.status( result ); return 1; } @@ -2273,7 +2273,7 @@ namespace mongo { actions.addAction(ActionType::internal); out->push_back(Privilege(ResourcePattern::forClusterResource(), actions)); } - bool run(const string& , BSONObj& cmdObj, int, string& errmsg, BSONObjBuilder& result, bool) { + bool run(TransactionExperiment* txn, const string& , BSONObj& cmdObj, int, string& errmsg, BSONObjBuilder& result, bool) { bool ok = migrateStatus.startCommit(); migrateStatus.status( result ); return ok; @@ -2292,7 +2292,7 @@ namespace mongo { actions.addAction(ActionType::internal); out->push_back(Privilege(ResourcePattern::forClusterResource(), actions)); } - bool run(const string& , BSONObj& cmdObj, int, string& errmsg, BSONObjBuilder& result, bool) { + bool run(TransactionExperiment* txn, const string& , BSONObj& cmdObj, int, string& errmsg, BSONObjBuilder& result, bool) { migrateStatus.abort(); migrateStatus.status( result ); return true; |