diff options
author | Mathias Stearn <mathias@10gen.com> | 2014-05-01 15:09:02 -0400 |
---|---|---|
committer | Mathias Stearn <mathias@10gen.com> | 2014-05-14 13:58:01 -0400 |
commit | 6378da06b637dbf86f916274c8f0457d925af6a9 (patch) | |
tree | b07693c3b786ad9eef3e17fe1a6a670f9229cd44 /src/mongo/db/commands/cleanup_orphaned_cmd.cpp | |
parent | 304534f11a265d8c18d788623185340c001cc26e (diff) | |
download | mongo-6378da06b637dbf86f916274c8f0457d925af6a9.tar.gz |
SERVER-13641 Pull TransactionExperiment up to top level request processor
Diffstat (limited to 'src/mongo/db/commands/cleanup_orphaned_cmd.cpp')
-rw-r--r-- | src/mongo/db/commands/cleanup_orphaned_cmd.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/mongo/db/commands/cleanup_orphaned_cmd.cpp b/src/mongo/db/commands/cleanup_orphaned_cmd.cpp index 5a851307535..fcc81a00c59 100644 --- a/src/mongo/db/commands/cleanup_orphaned_cmd.cpp +++ b/src/mongo/db/commands/cleanup_orphaned_cmd.cpp @@ -61,7 +61,8 @@ namespace mongo { * * If the collection is not sharded, returns CleanupResult_Done. */ - CleanupResult cleanupOrphanedData( const NamespaceString& ns, + CleanupResult cleanupOrphanedData( TransactionExperiment* txn, + const NamespaceString& ns, const BSONObj& startingFromKeyConst, bool secondaryThrottle, BSONObj* stoppedAtKey, @@ -116,7 +117,8 @@ namespace mongo { // Metadata snapshot may be stale now, but deleter checks metadata again in write lock // before delete. - if ( !getDeleter()->deleteNow( ns.toString(), + if ( !getDeleter()->deleteNow( txn, + ns.toString(), orphanRange.minKey, orphanRange.maxKey, keyPattern, @@ -177,7 +179,8 @@ namespace mongo { // Output static BSONField<BSONObj> stoppedAtKeyField; - bool run( string const &db, + bool newRun( TransactionExperiment* txn, + string const &db, BSONObj &cmdObj, int, string &errmsg, @@ -231,7 +234,8 @@ namespace mongo { } BSONObj stoppedAtKey; - CleanupResult cleanupResult = cleanupOrphanedData( NamespaceString( ns ), + CleanupResult cleanupResult = cleanupOrphanedData( txn, + NamespaceString( ns ), startingFromKey, secondaryThrottle, &stoppedAtKey, |