summaryrefslogtreecommitdiff
path: root/src/mongo/db/commands/validate.cpp
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2014-04-29 16:12:35 -0400
committerEliot Horowitz <eliot@10gen.com>2014-04-29 16:32:22 -0400
commitda81ef36996268f13b4b62153a766c7f1a1cf93a (patch)
treee5e64d663a87252d60bc4bce605f6d9e2e53130a /src/mongo/db/commands/validate.cpp
parentb36527b1863ed40e527bc80264075c8a09ad4a67 (diff)
downloadmongo-da81ef36996268f13b4b62153a766c7f1a1cf93a.tar.gz
SERVER-13641: add methods to transaction to check if an op is killed
Diffstat (limited to 'src/mongo/db/commands/validate.cpp')
-rw-r--r--src/mongo/db/commands/validate.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mongo/db/commands/validate.cpp b/src/mongo/db/commands/validate.cpp
index bb08fb4f882..b7148a00c01 100644
--- a/src/mongo/db/commands/validate.cpp
+++ b/src/mongo/db/commands/validate.cpp
@@ -34,6 +34,7 @@
#include "mongo/db/query/internal_plans.h"
#include "mongo/db/query/runner.h"
#include "mongo/db/storage/extent.h"
+#include "mongo/db/storage/mmap_v1/dur_transaction.h"
#include "mongo/db/catalog/collection.h"
namespace mongo {
@@ -76,6 +77,8 @@ namespace mongo {
}
Client::ReadContext ctx(ns_string.ns());
+ DurTransaction txn;
+
Database* db = ctx.ctx().db();
if ( !db ) {
errmsg = "database not found";
@@ -91,7 +94,7 @@ namespace mongo {
result.append( "ns", ns );
ValidateResults results;
- Status status = collection->validate( full, scanData, &results, &result );
+ Status status = collection->validate( &txn, full, scanData, &results, &result );
if ( !status.isOK() )
return appendCommandStatus( result, status );