diff options
author | Jason Rassi <rassi@10gen.com> | 2014-05-28 15:06:42 -0400 |
---|---|---|
committer | Jason Rassi <rassi@10gen.com> | 2014-05-28 15:06:52 -0400 |
commit | b27a764852873f5ecdc2dde6fffc317383c032c2 (patch) | |
tree | ae49b0c7e090b3925a25d2d2b593ca65c96ff6d9 /src | |
parent | 10143d873b81380a14fb2f2d5e9c299519930c51 (diff) | |
download | mongo-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.cpp | 1 |
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(); } } |