summaryrefslogtreecommitdiff
path: root/src/mongo/db/repair_database.cpp
diff options
context:
space:
mode:
authorJudah Schvimer <judah@mongodb.com>2018-04-24 16:37:18 -0400
committerJudah Schvimer <judah@mongodb.com>2018-05-03 12:01:09 -0400
commitdd45579fef2bf4e212161d1e3d97666a80b08bbf (patch)
treeb12df773845f5994240d8c50b0e171f277beb12a /src/mongo/db/repair_database.cpp
parentb1a7cffd3f151efe4d47864c89cf5c7cf9e884cc (diff)
downloadmongo-dd45579fef2bf4e212161d1e3d97666a80b08bbf.tar.gz
SERVER-34580 Plumb commit time to commit handlers when available
Diffstat (limited to 'src/mongo/db/repair_database.cpp')
-rw-r--r--src/mongo/db/repair_database.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/mongo/db/repair_database.cpp b/src/mongo/db/repair_database.cpp
index 7c106ec1d62..df89ce310c6 100644
--- a/src/mongo/db/repair_database.cpp
+++ b/src/mongo/db/repair_database.cpp
@@ -50,7 +50,7 @@
#include "mongo/db/catalog/namespace_uuid_cache.h"
#include "mongo/db/catalog/uuid_catalog.h"
#include "mongo/db/index/index_descriptor.h"
-#include "mongo/db/repl/replication_coordinator.h"
+#include "mongo/db/logical_clock.h"
#include "mongo/db/storage/mmap_v1/repair_database_interface.h"
#include "mongo/db/storage/storage_engine.h"
#include "mongo/util/log.h"
@@ -278,11 +278,10 @@ Status repairDatabase(OperationContext* opCtx,
// Set the minimum snapshot for all Collections in this db. This ensures that readers
// using majority readConcern level can only use the collections after their repaired
// versions are in the committed view.
- auto replCoord = repl::ReplicationCoordinator::get(opCtx);
- auto snapshotName = replCoord->getMinimumVisibleSnapshot(opCtx);
+ auto clusterTime = LogicalClock::getClusterTimeForReplicaSet(opCtx).asTimestamp();
for (auto&& collection : *db) {
- collection->setMinimumVisibleSnapshot(snapshotName);
+ collection->setMinimumVisibleSnapshot(clusterTime);
}
// Restore oplog Collection pointer cache.