From a51938f6f77a6c4934c0cc91bca31cebb6af62e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20G=C3=B3mez=20Ferro?= Date: Fri, 26 Nov 2021 14:39:47 +0000 Subject: SERVER-60837 Remove CollectionUUID and OptionalCollectionUUID aliases --- src/mongo/db/exec/sbe/parser/parser.cpp | 2 +- src/mongo/db/exec/sbe/parser/parser.h | 2 +- src/mongo/db/exec/sbe/sbe_plan_size_test.cpp | 4 ++-- src/mongo/db/exec/sbe/sbe_trial_run_tracker_test.cpp | 4 ++-- src/mongo/db/exec/sbe/stages/collection_helpers.cpp | 4 ++-- src/mongo/db/exec/sbe/stages/collection_helpers.h | 4 ++-- src/mongo/db/exec/sbe/stages/ix_scan.cpp | 2 +- src/mongo/db/exec/sbe/stages/ix_scan.h | 4 ++-- src/mongo/db/exec/sbe/stages/scan.cpp | 6 +++--- src/mongo/db/exec/sbe/stages/scan.h | 10 +++++----- 10 files changed, 21 insertions(+), 21 deletions(-) (limited to 'src/mongo/db/exec') diff --git a/src/mongo/db/exec/sbe/parser/parser.cpp b/src/mongo/db/exec/sbe/parser/parser.cpp index 1f0bb90d357..a169d712ff8 100644 --- a/src/mongo/db/exec/sbe/parser/parser.cpp +++ b/src/mongo/db/exec/sbe/parser/parser.cpp @@ -1885,7 +1885,7 @@ std::unique_ptr Parser::parse(OperationContext* opCtx, return std::move(ast->stage); } -CollectionUUID Parser::getCollectionUuid(const std::string& collName) { +UUID Parser::getCollectionUuid(const std::string& collName) { if (!_opCtx) { // The SBE plan cannot actually run without a valid UUID, but it's useful to allow the // parser to run in isolation for unit testing. diff --git a/src/mongo/db/exec/sbe/parser/parser.h b/src/mongo/db/exec/sbe/parser/parser.h index 0979fbd554b..0da73f8fe24 100644 --- a/src/mongo/db/exec/sbe/parser/parser.h +++ b/src/mongo/db/exec/sbe/parser/parser.h @@ -239,7 +239,7 @@ private: value::SlotVector correlated, value::SlotId outputSlot); - CollectionUUID getCollectionUuid(const std::string& collName); + UUID getCollectionUuid(const std::string& collName); PlanNodeId getCurrentPlanNodeId(); }; diff --git a/src/mongo/db/exec/sbe/sbe_plan_size_test.cpp b/src/mongo/db/exec/sbe/sbe_plan_size_test.cpp index aa6ad8545ee..91d97e3e498 100644 --- a/src/mongo/db/exec/sbe/sbe_plan_size_test.cpp +++ b/src/mongo/db/exec/sbe/sbe_plan_size_test.cpp @@ -160,7 +160,7 @@ TEST_F(PlanSizeTest, HashJoin) { } TEST_F(PlanSizeTest, IndexScan) { - auto collUuid = CollectionUUID::parse("00000000-0000-0000-0000-000000000000").getValue(); + auto collUuid = UUID::parse("00000000-0000-0000-0000-000000000000").getValue(); auto stage = makeS(collUuid, StringData(), true, @@ -221,7 +221,7 @@ TEST_F(PlanSizeTest, Project) { } TEST_F(PlanSizeTest, Scan) { - auto collUuid = CollectionUUID::parse("00000000-0000-0000-0000-000000000000").getValue(); + auto collUuid = UUID::parse("00000000-0000-0000-0000-000000000000").getValue(); auto stage = makeS(collUuid, generateSlotId(), generateSlotId(), diff --git a/src/mongo/db/exec/sbe/sbe_trial_run_tracker_test.cpp b/src/mongo/db/exec/sbe/sbe_trial_run_tracker_test.cpp index 6fb18efb84f..1e0644c35ff 100644 --- a/src/mongo/db/exec/sbe/sbe_trial_run_tracker_test.cpp +++ b/src/mongo/db/exec/sbe/sbe_trial_run_tracker_test.cpp @@ -46,7 +46,7 @@ namespace mongo::sbe { using TrialRunTrackerTest = PlanStageTestFixture; TEST_F(TrialRunTrackerTest, TrackerAttachesToStreamingStage) { - auto collUuid = CollectionUUID::parse("00000000-0000-0000-0000-000000000000").getValue(); + auto collUuid = UUID::parse("00000000-0000-0000-0000-000000000000").getValue(); auto scanStage = makeS(collUuid, generateSlotId(), generateSlotId(), @@ -90,7 +90,7 @@ TEST_F(TrialRunTrackerTest, TrackerAttachesToBlockingStage) { } TEST_F(TrialRunTrackerTest, TrackerAttachesToBothBlockingAndStreamingStages) { - auto collUuid = CollectionUUID::parse("00000000-0000-0000-0000-000000000000").getValue(); + auto collUuid = UUID::parse("00000000-0000-0000-0000-000000000000").getValue(); auto scanStage = makeS(collUuid, generateSlotId(), generateSlotId(), diff --git a/src/mongo/db/exec/sbe/stages/collection_helpers.cpp b/src/mongo/db/exec/sbe/stages/collection_helpers.cpp index 01139f3c5c5..6eec51407dd 100644 --- a/src/mongo/db/exec/sbe/stages/collection_helpers.cpp +++ b/src/mongo/db/exec/sbe/stages/collection_helpers.cpp @@ -36,7 +36,7 @@ namespace mongo::sbe { std::tuple acquireCollection(OperationContext* opCtx, - CollectionUUID collUuid) { + const UUID& collUuid) { // The collection is either locked at a higher level or a snapshot of the catalog (consistent // with the storage engine snapshot from which we are reading) has been stashed on the // 'OperationContext'. Either way, this means that the UUID must still exist in our view of the @@ -50,7 +50,7 @@ std::tuple acquireCollection(Operation CollectionPtr restoreCollection(OperationContext* opCtx, const NamespaceString& collName, - CollectionUUID collUuid, + const UUID& collUuid, uint64_t catalogEpoch) { // Re-lookup the collection pointer, by UUID. If the collection has been dropped, then this UUID // lookup will result in a null pointer. If the collection has been renamed, then the resulting diff --git a/src/mongo/db/exec/sbe/stages/collection_helpers.h b/src/mongo/db/exec/sbe/stages/collection_helpers.h index ed446c8aaee..4116f2980ff 100644 --- a/src/mongo/db/exec/sbe/stages/collection_helpers.h +++ b/src/mongo/db/exec/sbe/stages/collection_helpers.h @@ -63,7 +63,7 @@ using IndexKeyCorruptionCheckCallback = * the catalog. */ std::tuple acquireCollection(OperationContext* opCtx, - CollectionUUID collUuid); + const UUID& collUuid); /** * Re-acquires a pointer to the collection, intended for use during SBE yield recovery or when a @@ -74,6 +74,6 @@ std::tuple acquireCollection(Operation */ CollectionPtr restoreCollection(OperationContext* opCtx, const NamespaceString& collName, - CollectionUUID collUuid, + const UUID& collUuid, uint64_t catalogEpoch); } // namespace mongo::sbe diff --git a/src/mongo/db/exec/sbe/stages/ix_scan.cpp b/src/mongo/db/exec/sbe/stages/ix_scan.cpp index 85bb2be49a8..dc8244b047b 100644 --- a/src/mongo/db/exec/sbe/stages/ix_scan.cpp +++ b/src/mongo/db/exec/sbe/stages/ix_scan.cpp @@ -39,7 +39,7 @@ #include "mongo/db/index/index_access_method.h" namespace mongo::sbe { -IndexScanStage::IndexScanStage(CollectionUUID collUuid, +IndexScanStage::IndexScanStage(UUID collUuid, StringData indexName, bool forward, boost::optional recordSlot, diff --git a/src/mongo/db/exec/sbe/stages/ix_scan.h b/src/mongo/db/exec/sbe/stages/ix_scan.h index a215509bb2d..085cc04e81e 100644 --- a/src/mongo/db/exec/sbe/stages/ix_scan.h +++ b/src/mongo/db/exec/sbe/stages/ix_scan.h @@ -72,7 +72,7 @@ namespace mongo::sbe { */ class IndexScanStage final : public PlanStage { public: - IndexScanStage(CollectionUUID collUuid, + IndexScanStage(UUID collUuid, StringData indexName, bool forward, boost::optional recordSlot, @@ -118,7 +118,7 @@ private: const KeyString::Value& getSeekKeyLow() const; const KeyString::Value* getSeekKeyHigh() const; - const CollectionUUID _collUuid; + const UUID _collUuid; const std::string _indexName; const bool _forward; const boost::optional _recordSlot; diff --git a/src/mongo/db/exec/sbe/stages/scan.cpp b/src/mongo/db/exec/sbe/stages/scan.cpp index 020618c45ce..6be957e2185 100644 --- a/src/mongo/db/exec/sbe/stages/scan.cpp +++ b/src/mongo/db/exec/sbe/stages/scan.cpp @@ -41,7 +41,7 @@ namespace mongo { namespace sbe { -ScanStage::ScanStage(CollectionUUID collectionUuid, +ScanStage::ScanStage(UUID collectionUuid, boost::optional recordSlot, boost::optional recordIdSlot, boost::optional snapshotIdSlot, @@ -559,7 +559,7 @@ size_t ScanStage::estimateCompileTimeSize() const { return size; } -ParallelScanStage::ParallelScanStage(CollectionUUID collectionUuid, +ParallelScanStage::ParallelScanStage(UUID collectionUuid, boost::optional recordSlot, boost::optional recordIdSlot, boost::optional snapshotIdSlot, @@ -588,7 +588,7 @@ ParallelScanStage::ParallelScanStage(CollectionUUID collectionUuid, } ParallelScanStage::ParallelScanStage(const std::shared_ptr& state, - CollectionUUID collectionUuid, + const UUID& collectionUuid, boost::optional recordSlot, boost::optional recordIdSlot, boost::optional snapshotIdSlot, diff --git a/src/mongo/db/exec/sbe/stages/scan.h b/src/mongo/db/exec/sbe/stages/scan.h index 0fca27f742d..c7f10b35acd 100644 --- a/src/mongo/db/exec/sbe/stages/scan.h +++ b/src/mongo/db/exec/sbe/stages/scan.h @@ -93,7 +93,7 @@ struct ScanCallbacks { */ class ScanStage final : public PlanStage { public: - ScanStage(CollectionUUID collectionUuid, + ScanStage(UUID collectionUuid, boost::optional recordSlot, boost::optional recordIdSlot, boost::optional snapshotIdSlot, @@ -132,7 +132,7 @@ protected: TrialRunTracker* tracker, TrialRunTrackerAttachResultMask childrenAttachResult) override; private: - const CollectionUUID _collUuid; + const UUID _collUuid; const boost::optional _recordSlot; const boost::optional _recordIdSlot; const boost::optional _snapshotIdSlot; @@ -203,7 +203,7 @@ class ParallelScanStage final : public PlanStage { }; public: - ParallelScanStage(CollectionUUID collectionUuid, + ParallelScanStage(UUID collectionUuid, boost::optional recordSlot, boost::optional recordIdSlot, boost::optional snapshotIdSlot, @@ -217,7 +217,7 @@ public: ScanCallbacks callbacks); ParallelScanStage(const std::shared_ptr& state, - CollectionUUID collectionUuid, + const UUID& collectionUuid, boost::optional recordSlot, boost::optional recordIdSlot, boost::optional snapshotIdSlot, @@ -258,7 +258,7 @@ private: _currentRange = std::numeric_limits::max(); } - const CollectionUUID _collUuid; + const UUID _collUuid; const boost::optional _recordSlot; const boost::optional _recordIdSlot; const boost::optional _snapshotIdSlot; -- cgit v1.2.1