summaryrefslogtreecommitdiff
path: root/src/mongo/db/exec
diff options
context:
space:
mode:
authorDaniel Gómez Ferro <daniel.gomezferro@mongodb.com>2021-11-26 14:39:47 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-12-02 09:08:59 +0000
commita51938f6f77a6c4934c0cc91bca31cebb6af62e5 (patch)
treec6ad3f87cc216930c8707fdb9c7d3d2cfaf084cb /src/mongo/db/exec
parentc5f47b7a04ce688b088c1373805e876b0debae66 (diff)
downloadmongo-a51938f6f77a6c4934c0cc91bca31cebb6af62e5.tar.gz
SERVER-60837 Remove CollectionUUID and OptionalCollectionUUID aliases
Diffstat (limited to 'src/mongo/db/exec')
-rw-r--r--src/mongo/db/exec/sbe/parser/parser.cpp2
-rw-r--r--src/mongo/db/exec/sbe/parser/parser.h2
-rw-r--r--src/mongo/db/exec/sbe/sbe_plan_size_test.cpp4
-rw-r--r--src/mongo/db/exec/sbe/sbe_trial_run_tracker_test.cpp4
-rw-r--r--src/mongo/db/exec/sbe/stages/collection_helpers.cpp4
-rw-r--r--src/mongo/db/exec/sbe/stages/collection_helpers.h4
-rw-r--r--src/mongo/db/exec/sbe/stages/ix_scan.cpp2
-rw-r--r--src/mongo/db/exec/sbe/stages/ix_scan.h4
-rw-r--r--src/mongo/db/exec/sbe/stages/scan.cpp6
-rw-r--r--src/mongo/db/exec/sbe/stages/scan.h10
10 files changed, 21 insertions, 21 deletions
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<PlanStage> 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<IndexScanStage>(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<ScanStage>(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<ScanStage>(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<ScanStage>(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<CollectionPtr, NamespaceString, uint64_t> 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<CollectionPtr, NamespaceString, uint64_t> 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<CollectionPtr, NamespaceString, uint64_t> 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<CollectionPtr, NamespaceString, uint64_t> 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<value::SlotId> 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<value::SlotId> 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<value::SlotId> _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<value::SlotId> recordSlot,
boost::optional<value::SlotId> recordIdSlot,
boost::optional<value::SlotId> snapshotIdSlot,
@@ -559,7 +559,7 @@ size_t ScanStage::estimateCompileTimeSize() const {
return size;
}
-ParallelScanStage::ParallelScanStage(CollectionUUID collectionUuid,
+ParallelScanStage::ParallelScanStage(UUID collectionUuid,
boost::optional<value::SlotId> recordSlot,
boost::optional<value::SlotId> recordIdSlot,
boost::optional<value::SlotId> snapshotIdSlot,
@@ -588,7 +588,7 @@ ParallelScanStage::ParallelScanStage(CollectionUUID collectionUuid,
}
ParallelScanStage::ParallelScanStage(const std::shared_ptr<ParallelState>& state,
- CollectionUUID collectionUuid,
+ const UUID& collectionUuid,
boost::optional<value::SlotId> recordSlot,
boost::optional<value::SlotId> recordIdSlot,
boost::optional<value::SlotId> 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<value::SlotId> recordSlot,
boost::optional<value::SlotId> recordIdSlot,
boost::optional<value::SlotId> snapshotIdSlot,
@@ -132,7 +132,7 @@ protected:
TrialRunTracker* tracker, TrialRunTrackerAttachResultMask childrenAttachResult) override;
private:
- const CollectionUUID _collUuid;
+ const UUID _collUuid;
const boost::optional<value::SlotId> _recordSlot;
const boost::optional<value::SlotId> _recordIdSlot;
const boost::optional<value::SlotId> _snapshotIdSlot;
@@ -203,7 +203,7 @@ class ParallelScanStage final : public PlanStage {
};
public:
- ParallelScanStage(CollectionUUID collectionUuid,
+ ParallelScanStage(UUID collectionUuid,
boost::optional<value::SlotId> recordSlot,
boost::optional<value::SlotId> recordIdSlot,
boost::optional<value::SlotId> snapshotIdSlot,
@@ -217,7 +217,7 @@ public:
ScanCallbacks callbacks);
ParallelScanStage(const std::shared_ptr<ParallelState>& state,
- CollectionUUID collectionUuid,
+ const UUID& collectionUuid,
boost::optional<value::SlotId> recordSlot,
boost::optional<value::SlotId> recordIdSlot,
boost::optional<value::SlotId> snapshotIdSlot,
@@ -258,7 +258,7 @@ private:
_currentRange = std::numeric_limits<std::size_t>::max();
}
- const CollectionUUID _collUuid;
+ const UUID _collUuid;
const boost::optional<value::SlotId> _recordSlot;
const boost::optional<value::SlotId> _recordIdSlot;
const boost::optional<value::SlotId> _snapshotIdSlot;