summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Rassi <rassi@10gen.com>2014-05-28 15:06:42 -0400
committerJason Rassi <rassi@10gen.com>2014-05-28 16:54:21 -0400
commit6a8781ee93fca9c8371275545d8190b1c291d5cb (patch)
tree3e8394103e2fd2c80e99fca9f291c7c12c547fc5
parent6646cd2d72aecb3b267467598835d0d0ac97614a (diff)
downloadmongo-6a8781ee93fca9c8371275545d8190b1c291d5cb.tar.gz
SERVER-14056 Cross-DB renameCollection needs to call commitIfNeeded
Fixes regression introduced in 0abf27ae. Before 0abf27a, renameCollection used a DBDirectClient to read objects from the source namespace. The call to DBClientCursor::next() would issue a getmore after finishing each batch, which would reach a commit point (in DBDirectClient::call()). The port to the new collection interface removed the use of DBDirectClient, which removed renameCollection's commit point. (cherry picked from commit b27a764852873f5ecdc2dde6fffc317383c032c2) Conflicts: src/mongo/db/commands/rename_collection.cpp
-rw-r--r--src/mongo/db/commands/rename_collection.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mongo/db/commands/rename_collection.cpp b/src/mongo/db/commands/rename_collection.cpp
index 8aaf0052948..8fe0e17c5b1 100644
--- a/src/mongo/db/commands/rename_collection.cpp
+++ b/src/mongo/db/commands/rename_collection.cpp
@@ -258,6 +258,7 @@ namespace mongo {
errmsg = s.toString();
break;
}
+ getDur().commitIfNeeded();
}
}