diff options
author | Nicholas Zolnierz <nicholas.zolnierz@mongodb.com> | 2022-11-11 14:51:58 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-11-11 16:06:06 +0000 |
commit | 9fddc7a75011110e78d00ecc1054c7a5bbfb2c73 (patch) | |
tree | bd2f521cf61d95f0cdcc74fc4fb7fc5396e24751 | |
parent | 88880de2ae47f9431483b76f4474b4ddb9a4cad8 (diff) | |
download | mongo-9fddc7a75011110e78d00ecc1054c7a5bbfb2c73.tar.gz |
SERVER-70515 Remove getShardFilterer API
7 files changed, 0 insertions, 45 deletions
diff --git a/src/mongo/db/pipeline/process_interface/mongo_process_interface.h b/src/mongo/db/pipeline/process_interface/mongo_process_interface.h index 5951ca1c4ad..f77c171f837 100644 --- a/src/mongo/db/pipeline/process_interface/mongo_process_interface.h +++ b/src/mongo/db/pipeline/process_interface/mongo_process_interface.h @@ -339,12 +339,6 @@ public: Pipeline* pipeline) = 0; /** - * Produces a ShardFilterer. May return null. - */ - virtual std::unique_ptr<ShardFilterer> getShardFilterer( - const boost::intrusive_ptr<ExpressionContext>& expCtx) const = 0; - - /** * Returns a vector of owned BSONObjs, each of which contains details of an in-progress * operation or, optionally, an idle connection. If userMode is kIncludeAllUsers, report * operations for all authenticated users; otherwise, report only the current user's operations. diff --git a/src/mongo/db/pipeline/process_interface/mongos_process_interface.h b/src/mongo/db/pipeline/process_interface/mongos_process_interface.h index caf30df8869..2a309113bc7 100644 --- a/src/mongo/db/pipeline/process_interface/mongos_process_interface.h +++ b/src/mongo/db/pipeline/process_interface/mongos_process_interface.h @@ -176,11 +176,6 @@ public: MONGO_UNREACHABLE; } - std::unique_ptr<ShardFilterer> getShardFilterer( - const boost::intrusive_ptr<ExpressionContext>& expCtx) const override { - return nullptr; - } - std::string getShardName(OperationContext* opCtx) const final { MONGO_UNREACHABLE; } diff --git a/src/mongo/db/pipeline/process_interface/non_shardsvr_process_interface.h b/src/mongo/db/pipeline/process_interface/non_shardsvr_process_interface.h index ac5000d84fd..b684e0f0a13 100644 --- a/src/mongo/db/pipeline/process_interface/non_shardsvr_process_interface.h +++ b/src/mongo/db/pipeline/process_interface/non_shardsvr_process_interface.h @@ -58,12 +58,6 @@ public: BSONObj preparePipelineAndExplain(Pipeline* ownedPipeline, ExplainOptions::Verbosity verbosity); - std::unique_ptr<ShardFilterer> getShardFilterer( - const boost::intrusive_ptr<ExpressionContext>& expCtx) const override { - // We'll never do shard filtering on a standalone. - return nullptr; - } - boost::optional<ShardVersion> refreshAndGetCollectionVersion( const boost::intrusive_ptr<ExpressionContext>& expCtx, const NamespaceString& nss) const final { diff --git a/src/mongo/db/pipeline/process_interface/shardsvr_process_interface.cpp b/src/mongo/db/pipeline/process_interface/shardsvr_process_interface.cpp index 8d65c41709e..e33b6a6f323 100644 --- a/src/mongo/db/pipeline/process_interface/shardsvr_process_interface.cpp +++ b/src/mongo/db/pipeline/process_interface/shardsvr_process_interface.cpp @@ -163,16 +163,6 @@ BSONObj ShardServerProcessInterface::preparePipelineAndExplain( return sharded_agg_helpers::targetShardsForExplain(ownedPipeline); } -std::unique_ptr<ShardFilterer> ShardServerProcessInterface::getShardFilterer( - const boost::intrusive_ptr<ExpressionContext>& expCtx) const { - auto collectionFilter = - CollectionShardingState::assertCollectionLockedAndAcquire(expCtx->opCtx, expCtx->ns) - ->getOwnershipFilter( - expCtx->opCtx, - CollectionShardingState::OrphanCleanupPolicy::kDisallowOrphanCleanup); - return std::make_unique<ShardFiltererImpl>(std::move(collectionFilter)); -} - void ShardServerProcessInterface::renameIfOptionsAndIndexesHaveNotChanged( OperationContext* opCtx, const NamespaceString& sourceNs, diff --git a/src/mongo/db/pipeline/process_interface/shardsvr_process_interface.h b/src/mongo/db/pipeline/process_interface/shardsvr_process_interface.h index bfdc721cb3b..d9625a7f749 100644 --- a/src/mongo/db/pipeline/process_interface/shardsvr_process_interface.h +++ b/src/mongo/db/pipeline/process_interface/shardsvr_process_interface.h @@ -96,9 +96,6 @@ public: BSONObj preparePipelineAndExplain(Pipeline* ownedPipeline, ExplainOptions::Verbosity verbosity) final; - std::unique_ptr<ShardFilterer> getShardFilterer( - const boost::intrusive_ptr<ExpressionContext>& expCtx) const override final; - BSONObj getCollectionOptions(OperationContext* opCtx, const NamespaceString& nss) final; std::list<BSONObj> getIndexSpecs(OperationContext* opCtx, diff --git a/src/mongo/db/pipeline/process_interface/stub_lookup_single_document_process_interface.h b/src/mongo/db/pipeline/process_interface/stub_lookup_single_document_process_interface.h index 40a77f09e14..cc4bb49e65a 100644 --- a/src/mongo/db/pipeline/process_interface/stub_lookup_single_document_process_interface.h +++ b/src/mongo/db/pipeline/process_interface/stub_lookup_single_document_process_interface.h @@ -91,16 +91,6 @@ public: const Document& documentKey, boost::optional<BSONObj> readConcern); - std::unique_ptr<ShardFilterer> getShardFilterer( - const boost::intrusive_ptr<ExpressionContext>& expCtx) const override { - // Try to emulate the behavior mongos and mongod would each follow. - if (expCtx->inMongos) { - return nullptr; - } else { - return std::make_unique<StubShardFilterer>(); - } - } - private: std::deque<DocumentSource::GetNextResult> _mockResults; }; diff --git a/src/mongo/db/pipeline/process_interface/stub_mongo_process_interface.h b/src/mongo/db/pipeline/process_interface/stub_mongo_process_interface.h index 1b991a55cd9..0dd40ddd547 100644 --- a/src/mongo/db/pipeline/process_interface/stub_mongo_process_interface.h +++ b/src/mongo/db/pipeline/process_interface/stub_mongo_process_interface.h @@ -188,11 +188,6 @@ public: MONGO_UNREACHABLE; } - std::unique_ptr<ShardFilterer> getShardFilterer( - const boost::intrusive_ptr<ExpressionContext>& expCtx) const override { - MONGO_UNREACHABLE; - } - std::vector<BSONObj> getCurrentOps(const boost::intrusive_ptr<ExpressionContext>& expCtx, CurrentOpConnectionsMode connMode, CurrentOpSessionsMode sessionMode, |