summaryrefslogtreecommitdiff
path: root/src
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 15:06:52 -0400
commitb27a764852873f5ecdc2dde6fffc317383c032c2 (patch)
treeae49b0c7e090b3925a25d2d2b593ca65c96ff6d9 /src
parent10143d873b81380a14fb2f2d5e9c299519930c51 (diff)
downloadmongo-b27a764852873f5ecdc2dde6fffc317383c032c2.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.
Diffstat (limited to 'src')
-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 ac31b040f75..851b783aa99 100644
--- a/src/mongo/db/commands/rename_collection.cpp
+++ b/src/mongo/db/commands/rename_collection.cpp
@@ -268,6 +268,7 @@ namespace mongo {
errmsg = s.toString();
break;
}
+ txn->recoveryUnit()->commitIfNeeded();
}
}