summaryrefslogtreecommitdiff
path: root/src/mongo/db/catalog
diff options
context:
space:
mode:
authorGregory Wlodarek <gregory.wlodarek@mongodb.com>2023-04-12 15:25:14 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2023-04-18 20:42:57 +0000
commit24c09afa20bb2dd94192182fabaffd09b3a80545 (patch)
treef2b8c8991b339313bcd386bf928f078e8ec6086e /src/mongo/db/catalog
parentf05b9ba71ed361a23cc7591f2dbfe5eded30b468 (diff)
downloadmongo-24c09afa20bb2dd94192182fabaffd09b3a80545.tar.gz
SERVER-65974 Replace HistoricalIdentTracker with checkpoint cursors
Diffstat (limited to 'src/mongo/db/catalog')
-rw-r--r--src/mongo/db/catalog/SConscript1
-rw-r--r--src/mongo/db/catalog/database_impl.cpp32
-rw-r--r--src/mongo/db/catalog/index_catalog_impl.cpp8
3 files changed, 1 insertions, 40 deletions
diff --git a/src/mongo/db/catalog/SConscript b/src/mongo/db/catalog/SConscript
index 531064815d8..e254e684b5c 100644
--- a/src/mongo/db/catalog/SConscript
+++ b/src/mongo/db/catalog/SConscript
@@ -404,7 +404,6 @@ env.Library(
'$BUILD_DIR/mongo/db/storage/capped_snapshots',
'$BUILD_DIR/mongo/db/storage/durable_catalog_impl',
'$BUILD_DIR/mongo/db/storage/execution_context',
- '$BUILD_DIR/mongo/db/storage/historical_ident_tracker',
'$BUILD_DIR/mongo/db/storage/key_string',
'$BUILD_DIR/mongo/db/storage/record_store_base',
'$BUILD_DIR/mongo/db/storage/storage_engine_common',
diff --git a/src/mongo/db/catalog/database_impl.cpp b/src/mongo/db/catalog/database_impl.cpp
index 0af10c6b875..c238aee5f37 100644
--- a/src/mongo/db/catalog/database_impl.cpp
+++ b/src/mongo/db/catalog/database_impl.cpp
@@ -66,7 +66,6 @@
#include "mongo/db/service_context.h"
#include "mongo/db/stats/top.h"
#include "mongo/db/storage/durable_catalog.h"
-#include "mongo/db/storage/historical_ident_tracker.h"
#include "mongo/db/storage/recovery_unit.h"
#include "mongo/db/storage/storage_engine.h"
#include "mongo/db/storage/storage_engine_init.h"
@@ -590,16 +589,6 @@ Status DatabaseImpl::_finishDropCollection(OperationContext* opCtx,
opCtx, collection->ns(), collection->getCatalogId(), sharedIdent);
if (!status.isOK())
return status;
-
- opCtx->recoveryUnit()->onCommit(
- [nss, uuid, ident = sharedIdent->getIdent()](OperationContext* opCtx,
- boost::optional<Timestamp> commitTime) {
- if (!commitTime) {
- return;
- }
-
- HistoricalIdentTracker::get(opCtx).recordDrop(ident, nss, uuid, commitTime.value());
- });
}
CollectionCatalog::get(opCtx)->dropCollection(
@@ -652,27 +641,6 @@ Status DatabaseImpl::renameCollection(OperationContext* opCtx,
return status;
CollectionCatalog::get(opCtx)->onCollectionRename(opCtx, writableCollection, fromNss);
-
- opCtx->recoveryUnit()->onCommit([fromNss,
- writableCollection](OperationContext* opCtx,
- boost::optional<Timestamp> commitTime) {
- if (!commitTime) {
- return;
- }
-
- HistoricalIdentTracker::get(opCtx).recordRename(
- writableCollection->getSharedIdent()->getIdent(),
- fromNss,
- writableCollection->uuid(),
- commitTime.value());
-
- const auto readyIndexes = writableCollection->getIndexCatalog()->getAllReadyEntriesShared();
- for (const auto& readyIndex : readyIndexes) {
- HistoricalIdentTracker::get(opCtx).recordRename(
- readyIndex->getIdent(), fromNss, writableCollection->uuid(), commitTime.value());
- }
- });
-
return status;
}
diff --git a/src/mongo/db/catalog/index_catalog_impl.cpp b/src/mongo/db/catalog/index_catalog_impl.cpp
index 5eef448be41..bac11d6c959 100644
--- a/src/mongo/db/catalog/index_catalog_impl.cpp
+++ b/src/mongo/db/catalog/index_catalog_impl.cpp
@@ -70,7 +70,6 @@
#include "mongo/db/service_context.h"
#include "mongo/db/storage/durable_catalog.h"
#include "mongo/db/storage/execution_context.h"
-#include "mongo/db/storage/historical_ident_tracker.h"
#include "mongo/db/storage/kv/kv_engine.h"
#include "mongo/db/storage/storage_engine_init.h"
#include "mongo/db/storage/storage_parameters_gen.h"
@@ -1413,12 +1412,7 @@ public:
_entry(std::move(entry)),
_collectionDecorations(collectionDecorations) {}
- void commit(OperationContext* opCtx, boost::optional<Timestamp> commitTime) final {
- if (commitTime) {
- HistoricalIdentTracker::get(opCtx).recordDrop(
- _entry->getIdent(), _nss, _uuid, commitTime.value());
- }
-
+ void commit(OperationContext* opCtx, boost::optional<Timestamp>) final {
_entry->setDropped();
}