summaryrefslogtreecommitdiff
path: root/src/mongo/db/storage
diff options
context:
space:
mode:
authorGregory Wlodarek <gregory.wlodarek@mongodb.com>2020-11-12 20:26:08 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-11-13 00:01:15 +0000
commit911538668252d9885fe3d3859175f2711fb064bc (patch)
treeaa4657f49e417c96440b5ea2980f2edff41bb5cc /src/mongo/db/storage
parentd78a7020f80d9a10b3fc5ba289841b3a97538582 (diff)
downloadmongo-911538668252d9885fe3d3859175f2711fb064bc.tar.gz
SERVER-49795 Remove 'getOldestOpenReadTimestamp()' from the storage engine interface
Diffstat (limited to 'src/mongo/db/storage')
-rw-r--r--src/mongo/db/storage/devnull/devnull_kv_engine.h4
-rw-r--r--src/mongo/db/storage/ephemeral_for_test/ephemeral_for_test_kv_engine.h4
-rw-r--r--src/mongo/db/storage/kv/kv_drop_pending_ident_reaper_test.cpp3
-rw-r--r--src/mongo/db/storage/kv/kv_engine.h5
-rw-r--r--src/mongo/db/storage/storage_engine.h7
-rw-r--r--src/mongo/db/storage/storage_engine_impl.cpp4
-rw-r--r--src/mongo/db/storage/storage_engine_impl.h2
-rw-r--r--src/mongo/db/storage/storage_engine_mock.h3
-rw-r--r--src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp15
-rw-r--r--src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.h2
10 files changed, 0 insertions, 49 deletions
diff --git a/src/mongo/db/storage/devnull/devnull_kv_engine.h b/src/mongo/db/storage/devnull/devnull_kv_engine.h
index fc1ff14117b..d83b1282b7e 100644
--- a/src/mongo/db/storage/devnull/devnull_kv_engine.h
+++ b/src/mongo/db/storage/devnull/devnull_kv_engine.h
@@ -125,10 +125,6 @@ public:
return Timestamp();
}
- virtual Timestamp getOldestOpenReadTimestamp() const override {
- return Timestamp();
- }
-
boost::optional<Timestamp> getOplogNeededForCrashRecovery() const final {
return boost::none;
}
diff --git a/src/mongo/db/storage/ephemeral_for_test/ephemeral_for_test_kv_engine.h b/src/mongo/db/storage/ephemeral_for_test/ephemeral_for_test_kv_engine.h
index a55ee5495b1..51c5ad46eb0 100644
--- a/src/mongo/db/storage/ephemeral_for_test/ephemeral_for_test_kv_engine.h
+++ b/src/mongo/db/storage/ephemeral_for_test/ephemeral_for_test_kv_engine.h
@@ -147,10 +147,6 @@ public:
return Timestamp(id.repr());
}
- virtual Timestamp getOldestOpenReadTimestamp() const override {
- return Timestamp();
- }
-
boost::optional<Timestamp> getOplogNeededForCrashRecovery() const final {
return boost::none;
}
diff --git a/src/mongo/db/storage/kv/kv_drop_pending_ident_reaper_test.cpp b/src/mongo/db/storage/kv/kv_drop_pending_ident_reaper_test.cpp
index 76f70b1597a..f8dc1608bbb 100644
--- a/src/mongo/db/storage/kv/kv_drop_pending_ident_reaper_test.cpp
+++ b/src/mongo/db/storage/kv/kv_drop_pending_ident_reaper_test.cpp
@@ -111,9 +111,6 @@ public:
Timestamp getAllDurableTimestamp() const override {
return {};
}
- Timestamp getOldestOpenReadTimestamp() const override {
- return {};
- }
boost::optional<Timestamp> getOplogNeededForCrashRecovery() const override {
return boost::none;
diff --git a/src/mongo/db/storage/kv/kv_engine.h b/src/mongo/db/storage/kv/kv_engine.h
index 866258b58b2..1e4c4947fd3 100644
--- a/src/mongo/db/storage/kv/kv_engine.h
+++ b/src/mongo/db/storage/kv/kv_engine.h
@@ -423,11 +423,6 @@ public:
virtual Timestamp getAllDurableTimestamp() const = 0;
/**
- * See `StorageEngine::getOldestOpenReadTimestamp`
- */
- virtual Timestamp getOldestOpenReadTimestamp() const = 0;
-
- /**
* See `StorageEngine::getOplogNeededForCrashRecovery`
*/
virtual boost::optional<Timestamp> getOplogNeededForCrashRecovery() const = 0;
diff --git a/src/mongo/db/storage/storage_engine.h b/src/mongo/db/storage/storage_engine.h
index 5dfc0206e13..aac064fffd9 100644
--- a/src/mongo/db/storage/storage_engine.h
+++ b/src/mongo/db/storage/storage_engine.h
@@ -630,13 +630,6 @@ public:
virtual Timestamp getAllDurableTimestamp() const = 0;
/**
- * Returns the oldest read timestamp in use by an open transaction. Storage engines that support
- * the 'snapshot' ReadConcern must provide an implementation. Other storage engines may provide
- * a no-op implementation.
- */
- virtual Timestamp getOldestOpenReadTimestamp() const = 0;
-
- /**
* Returns the minimum possible Timestamp value in the oplog that replication may need for
* recovery in the event of a crash.
*
diff --git a/src/mongo/db/storage/storage_engine_impl.cpp b/src/mongo/db/storage/storage_engine_impl.cpp
index 9a1ea732079..388f845b58f 100644
--- a/src/mongo/db/storage/storage_engine_impl.cpp
+++ b/src/mongo/db/storage/storage_engine_impl.cpp
@@ -1004,10 +1004,6 @@ Timestamp StorageEngineImpl::getAllDurableTimestamp() const {
return _engine->getAllDurableTimestamp();
}
-Timestamp StorageEngineImpl::getOldestOpenReadTimestamp() const {
- return _engine->getOldestOpenReadTimestamp();
-}
-
boost::optional<Timestamp> StorageEngineImpl::getOplogNeededForCrashRecovery() const {
return _engine->getOplogNeededForCrashRecovery();
}
diff --git a/src/mongo/db/storage/storage_engine_impl.h b/src/mongo/db/storage/storage_engine_impl.h
index 912f31cef8a..00d471e12fa 100644
--- a/src/mongo/db/storage/storage_engine_impl.h
+++ b/src/mongo/db/storage/storage_engine_impl.h
@@ -151,8 +151,6 @@ public:
virtual Timestamp getAllDurableTimestamp() const override;
- virtual Timestamp getOldestOpenReadTimestamp() const override;
-
boost::optional<Timestamp> getOplogNeededForCrashRecovery() const final;
bool supportsReadConcernSnapshot() const final;
diff --git a/src/mongo/db/storage/storage_engine_mock.h b/src/mongo/db/storage/storage_engine_mock.h
index 0e2fb8caef4..4cb3caf71d7 100644
--- a/src/mongo/db/storage/storage_engine_mock.h
+++ b/src/mongo/db/storage/storage_engine_mock.h
@@ -160,9 +160,6 @@ public:
Timestamp getAllDurableTimestamp() const final {
return {};
}
- Timestamp getOldestOpenReadTimestamp() const final {
- return {};
- }
boost::optional<Timestamp> getOplogNeededForCrashRecovery() const final {
return boost::none;
}
diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp b/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp
index 7ffe6765f33..0d12d95fd3b 100644
--- a/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp
+++ b/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp
@@ -2163,21 +2163,6 @@ Timestamp WiredTigerKVEngine::getAllDurableTimestamp() const {
return Timestamp(ret);
}
-Timestamp WiredTigerKVEngine::getOldestOpenReadTimestamp() const {
- // Return the minimum read timestamp of all open transactions.
- char buf[(2 * 8 /*bytes in hex*/) + 1 /*null terminator*/];
- auto wtstatus = _conn->query_timestamp(_conn, buf, "get=oldest_reader");
- if (wtstatus == WT_NOTFOUND) {
- return Timestamp();
- } else {
- invariantWTOK(wtstatus);
- }
-
- uint64_t tmp;
- fassert(38802, NumberParser().base(16)(buf, &tmp));
- return Timestamp(tmp);
-}
-
boost::optional<Timestamp> WiredTigerKVEngine::getRecoveryTimestamp() const {
if (!supportsRecoveryTimestamp()) {
LOGV2_FATAL(50745,
diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.h b/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.h
index 97b652314a1..a1170dd75f3 100644
--- a/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.h
+++ b/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.h
@@ -286,8 +286,6 @@ public:
Timestamp getAllDurableTimestamp() const override;
- Timestamp getOldestOpenReadTimestamp() const override;
-
bool supportsReadConcernSnapshot() const final override;
bool supportsOplogStones() const final override;