summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaloian Manassiev <kaloian.manassiev@mongodb.com>2021-03-01 10:44:19 -0500
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-03-04 18:25:13 +0000
commit0d8114dacb5a2e19d6208ae4770a3b3d2864662d (patch)
treea78c9275b0df80606253050de3e28a9149f84f79
parentca1bf42db1f3057e55a312cfe95d49150a4c4cd6 (diff)
downloadmongo-0d8114dacb5a2e19d6208ae4770a3b3d2864662d.tar.gz
SERVER-52778 Remove unused 'allowImplictCollectionCreate' from the router
-rw-r--r--src/mongo/db/SConscript24
-rw-r--r--src/mongo/db/repl/SConscript23
-rw-r--r--src/mongo/db/repl/bgsync.cpp1
-rw-r--r--src/mongo/db/repl/rollback_impl.cpp1
-rw-r--r--src/mongo/db/repl/rollback_impl_test.cpp2
-rw-r--r--src/mongo/db/s/SConscript1
-rw-r--r--src/mongo/dbtests/SConscript3
-rw-r--r--src/mongo/s/cluster_commands_helpers.cpp8
-rw-r--r--src/mongo/s/cluster_commands_helpers.h5
-rw-r--r--src/mongo/s/write_ops/batch_write_op.cpp2
-rw-r--r--src/mongo/s/write_ops/batched_command_request.cpp9
-rw-r--r--src/mongo/s/write_ops/batched_command_request.h9
12 files changed, 26 insertions, 62 deletions
diff --git a/src/mongo/db/SConscript b/src/mongo/db/SConscript
index 005a93ebc9b..429b8039ec0 100644
--- a/src/mongo/db/SConscript
+++ b/src/mongo/db/SConscript
@@ -757,30 +757,30 @@ env.Library(
)
env.Library(
- target="service_context_d",
+ target='service_context_d',
source=[
- "service_entry_point_mongod.cpp",
+ 'service_entry_point_mongod.cpp',
],
LIBDEPS=[
'$BUILD_DIR/mongo/base',
- '$BUILD_DIR/mongo/db/auth/auth',
- '$BUILD_DIR/mongo/db/concurrency/lock_manager',
- '$BUILD_DIR/mongo/db/s/sharding_runtime_d',
- '$BUILD_DIR/mongo/db/storage/storage_engine_common',
- '$BUILD_DIR/mongo/db/storage/storage_engine_lock_file',
- '$BUILD_DIR/mongo/db/storage/storage_engine_metadata',
- '$BUILD_DIR/mongo/db/storage/storage_options',
'$BUILD_DIR/mongo/transport/service_entry_point',
+ 'auth/auth',
'command_can_run_here',
+ 'concurrency/lock_manager',
'curop',
'curop_metrics',
'lasterror',
'rw_concern_d',
+ 's/sharding_runtime_d',
+ 'storage/storage_engine_common',
+ 'storage/storage_engine_lock_file',
+ 'storage/storage_engine_metadata',
+ 'storage/storage_options',
],
LIBDEPS_PRIVATE=[
- '$BUILD_DIR/mongo/db/commands/fsync_locked',
- '$BUILD_DIR/mongo/db/service_entry_point_common',
+ 'commands/fsync_locked',
'read_concern_d_impl',
+ 'service_entry_point_common',
],
)
@@ -2082,7 +2082,6 @@ env.Library(
'query_exec',
'read_concern_d_impl',
'read_write_concern_defaults',
- 'repl/bgsync',
'repl/oplog_application',
'repl/oplog_buffer_blocking_queue',
'repl/oplog_buffer_collection',
@@ -2098,7 +2097,6 @@ env.Library(
'rw_concern_d',
's/sessions_collection_config_server',
's/sharding_commands_d',
- 's/sharding_runtime_d',
'service_context_d',
'service_liaison_mongod',
'sessions_collection_rs',
diff --git a/src/mongo/db/repl/SConscript b/src/mongo/db/repl/SConscript
index 9c5ebe59122..92f8a039725 100644
--- a/src/mongo/db/repl/SConscript
+++ b/src/mongo/db/repl/SConscript
@@ -144,6 +144,7 @@ env.Library(
'sync_source_resolver',
],
LIBDEPS_PRIVATE=[
+ '$BUILD_DIR/mongo/db/op_observer',
'$BUILD_DIR/mongo/executor/thread_pool_task_executor',
'repl_server_parameters',
],
@@ -409,7 +410,6 @@ env.Library(
'$BUILD_DIR/mongo/db/catalog/database_holder',
'$BUILD_DIR/mongo/db/dbhelpers',
'$BUILD_DIR/mongo/db/query_exec',
- '$BUILD_DIR/mongo/db/s/sharding_runtime_d',
'$BUILD_DIR/mongo/db/storage/remove_saver',
'$BUILD_DIR/mongo/util/fail_point',
'drop_pending_collection_reaper',
@@ -420,6 +420,7 @@ env.Library(
],
LIBDEPS_PRIVATE=[
'$BUILD_DIR/mongo/db/catalog/index_build_oplog_entry',
+ '$BUILD_DIR/mongo/db/s/sharding_runtime_d',
'$BUILD_DIR/mongo/db/storage/journal_flusher',
],
)
@@ -456,9 +457,9 @@ env.Library(
'rollback_test_fixture.cpp',
],
LIBDEPS=[
+ '$BUILD_DIR/mongo/db/op_observer',
'$BUILD_DIR/mongo/db/query_exec',
'$BUILD_DIR/mongo/db/read_write_concern_defaults_mock',
- '$BUILD_DIR/mongo/db/service_context',
'$BUILD_DIR/mongo/db/service_context_d_test_fixture',
'drop_pending_collection_reaper',
'oplog_interface_mock',
@@ -480,7 +481,6 @@ env.Library(
LIBDEPS=[
'$BUILD_DIR/mongo/db/concurrency/lock_manager',
'$BUILD_DIR/mongo/db/kill_sessions_local',
- '$BUILD_DIR/mongo/db/s/sharding_runtime_d',
'$BUILD_DIR/mongo/db/service_context',
'$BUILD_DIR/mongo/db/write_ops',
'$BUILD_DIR/mongo/util/net/network',
@@ -491,6 +491,7 @@ env.Library(
LIBDEPS_PRIVATE=[
'$BUILD_DIR/mongo/db/catalog/import_collection_oplog_entry',
'$BUILD_DIR/mongo/db/index_builds_coordinator_interface',
+ '$BUILD_DIR/mongo/db/s/sharding_runtime_d',
'$BUILD_DIR/mongo/idl/server_parameter',
'drop_pending_collection_reaper',
],
@@ -854,7 +855,7 @@ env.Library(
'$BUILD_DIR/mongo/db/commands',
'$BUILD_DIR/mongo/db/commands/test_commands_enabled',
'$BUILD_DIR/mongo/db/lasterror',
- '$BUILD_DIR/mongo/db/repl/repl_coordinator_interface',
+ 'repl_coordinator_interface',
],
LIBDEPS_PRIVATE=[
'$BUILD_DIR/mongo/executor/connection_pool_executor',
@@ -877,9 +878,9 @@ env.Library(
'$BUILD_DIR/mongo/db/concurrency/lock_manager',
'$BUILD_DIR/mongo/db/dbhelpers',
'$BUILD_DIR/mongo/db/lasterror',
- '$BUILD_DIR/mongo/db/repl/repl_coordinator_interface',
'$BUILD_DIR/mongo/db/storage/storage_options',
'drop_pending_collection_reaper',
+ 'repl_coordinator_interface',
'repl_server_parameters',
'repl_set_status_commands',
'repl_settings',
@@ -1374,11 +1375,11 @@ env.Library(
)
env.Library(
- target="serveronly_repl",
+ target='serveronly_repl',
source=[
'noop_writer.cpp',
- "replication_coordinator_external_state_impl.cpp",
- "sync_source_feedback.cpp",
+ 'replication_coordinator_external_state_impl.cpp',
+ 'sync_source_feedback.cpp',
],
LIBDEPS=[
'$BUILD_DIR/mongo/base',
@@ -1394,9 +1395,6 @@ env.Library(
'$BUILD_DIR/mongo/db/logical_time',
'$BUILD_DIR/mongo/db/op_observer',
'$BUILD_DIR/mongo/db/query_exec',
- '$BUILD_DIR/mongo/db/repl/oplog_buffer_proxy',
- '$BUILD_DIR/mongo/db/repl/replication_metrics',
- '$BUILD_DIR/mongo/db/s/sharding_runtime_d',
'$BUILD_DIR/mongo/db/service_context',
'$BUILD_DIR/mongo/db/stats/counters',
'$BUILD_DIR/mongo/db/system_index',
@@ -1407,6 +1405,7 @@ env.Library(
'drop_pending_collection_reaper',
'oplog_application',
'oplog_buffer_collection',
+ 'oplog_buffer_proxy',
'oplog_interface_remote',
'optime',
'primary_only_service',
@@ -1414,6 +1413,7 @@ env.Library(
'repl_settings',
'replication_consistency_markers_impl',
'replication_info',
+ 'replication_metrics',
'replication_process',
'replication_recovery',
'reporter',
@@ -1423,6 +1423,7 @@ env.Library(
LIBDEPS_PRIVATE=[
'$BUILD_DIR/mongo/db/commands/mongod_fcv',
'$BUILD_DIR/mongo/db/index_builds_coordinator_interface',
+ '$BUILD_DIR/mongo/db/s/sharding_runtime_d',
'$BUILD_DIR/mongo/db/storage/flow_control',
'$BUILD_DIR/mongo/db/storage/storage_control',
'local_oplog_info',
diff --git a/src/mongo/db/repl/bgsync.cpp b/src/mongo/db/repl/bgsync.cpp
index 4f751caf78e..6fbb2afa405 100644
--- a/src/mongo/db/repl/bgsync.cpp
+++ b/src/mongo/db/repl/bgsync.cpp
@@ -57,7 +57,6 @@
#include "mongo/db/repl/rollback_source_impl.h"
#include "mongo/db/repl/rs_rollback.h"
#include "mongo/db/repl/storage_interface.h"
-#include "mongo/db/s/shard_identity_rollback_notifier.h"
#include "mongo/db/shutdown_in_progress_quiesce_info.h"
#include "mongo/logv2/log.h"
#include "mongo/rpc/get_status_from_command_result.h"
diff --git a/src/mongo/db/repl/rollback_impl.cpp b/src/mongo/db/repl/rollback_impl.cpp
index 65e30e0078c..c1ea618a6e5 100644
--- a/src/mongo/db/repl/rollback_impl.cpp
+++ b/src/mongo/db/repl/rollback_impl.cpp
@@ -56,7 +56,6 @@
#include "mongo/db/repl/storage_interface.h"
#include "mongo/db/repl/tenant_migration_access_blocker_util.h"
#include "mongo/db/repl/transaction_oplog_application.h"
-#include "mongo/db/s/shard_identity_rollback_notifier.h"
#include "mongo/db/s/type_shard_identity.h"
#include "mongo/db/server_recovery.h"
#include "mongo/db/session_catalog_mongod.h"
diff --git a/src/mongo/db/repl/rollback_impl_test.cpp b/src/mongo/db/repl/rollback_impl_test.cpp
index 8d09e456e50..f034f7d399c 100644
--- a/src/mongo/db/repl/rollback_impl_test.cpp
+++ b/src/mongo/db/repl/rollback_impl_test.cpp
@@ -45,7 +45,6 @@
#include "mongo/db/repl/oplog_interface_mock.h"
#include "mongo/db/repl/rollback_impl.h"
#include "mongo/db/repl/rollback_test_fixture.h"
-#include "mongo/db/s/shard_identity_rollback_notifier.h"
#include "mongo/db/s/type_shard_identity.h"
#include "mongo/db/service_context.h"
#include "mongo/logv2/log.h"
@@ -1583,7 +1582,6 @@ public:
<< " in namespace with uuid " << uuid.toString();
}
-
protected:
OpObserver::RollbackObserverInfo _rbInfo;
};
diff --git a/src/mongo/db/s/SConscript b/src/mongo/db/s/SConscript
index 96b85b3b2a6..865077e2b05 100644
--- a/src/mongo/db/s/SConscript
+++ b/src/mongo/db/s/SConscript
@@ -530,7 +530,6 @@ env.CppUnitTest(
'resharding_util',
'shard_server_test_fixture',
'sharding_logging',
- 'sharding_runtime_d',
'transaction_coordinator',
],
)
diff --git a/src/mongo/dbtests/SConscript b/src/mongo/dbtests/SConscript
index acae12935c9..41c4226d951 100644
--- a/src/mongo/dbtests/SConscript
+++ b/src/mongo/dbtests/SConscript
@@ -41,6 +41,9 @@ env.Library(
'$BUILD_DIR/mongo/unittest/unittest',
'framework_options',
],
+ LIBDEPS_PRIVATE=[
+ '$BUILD_DIR/mongo/db/s/sharding_runtime_d',
+ ],
)
env.Library(
diff --git a/src/mongo/s/cluster_commands_helpers.cpp b/src/mongo/s/cluster_commands_helpers.cpp
index 9de77c56b22..e23f1d63c89 100644
--- a/src/mongo/s/cluster_commands_helpers.cpp
+++ b/src/mongo/s/cluster_commands_helpers.cpp
@@ -144,8 +144,6 @@ boost::intrusive_ptr<ExpressionContext> makeExpressionContextWithDefaultsForTarg
namespace {
-const auto kAllowImplicitCollectionCreation = "allowImplicitCollectionCreation"_sd;
-
/**
* Constructs a requests vector targeting each of the specified shard ids. Each request contains the
* same cmdObj combined with the default sharding parameters.
@@ -272,12 +270,6 @@ BSONObj appendShardVersion(BSONObj cmdObj, ChunkVersion version) {
return cmdWithVersionBob.obj();
}
-BSONObj appendAllowImplicitCreate(BSONObj cmdObj, bool allow) {
- BSONObjBuilder newCmdBuilder(std::move(cmdObj));
- newCmdBuilder.append(kAllowImplicitCollectionCreation, allow);
- return newCmdBuilder.obj();
-}
-
BSONObj applyReadWriteConcern(OperationContext* opCtx,
bool appendRC,
bool appendWC,
diff --git a/src/mongo/s/cluster_commands_helpers.h b/src/mongo/s/cluster_commands_helpers.h
index 56dc915f7ef..9638972b5ab 100644
--- a/src/mongo/s/cluster_commands_helpers.h
+++ b/src/mongo/s/cluster_commands_helpers.h
@@ -133,11 +133,6 @@ BSONObj appendDbVersionIfPresent(BSONObj cmdObj, DatabaseVersion dbVersion);
BSONObj appendShardVersion(BSONObj cmdObj, ChunkVersion version);
/**
- * Returns a copy of 'cmdObj' with 'allowImplicitCollectionCreation' appended.
- */
-BSONObj appendAllowImplicitCreate(BSONObj cmdObj, bool allow);
-
-/**
* Returns a copy of 'cmdObj' with the read/writeConcern from the OpCtx appended, unless the
* cmdObj explicitly specifies read/writeConcern.
*/
diff --git a/src/mongo/s/write_ops/batch_write_op.cpp b/src/mongo/s/write_ops/batch_write_op.cpp
index c623efc5fa5..03fd3ae99f1 100644
--- a/src/mongo/s/write_ops/batch_write_op.cpp
+++ b/src/mongo/s/write_ops/batch_write_op.cpp
@@ -560,8 +560,6 @@ BatchedCommandRequest BatchWriteOp::buildBatchRequest(
request.setWriteConcern(_opCtx->getWriteConcern().toBSON());
}
- request.setAllowImplicitCreate(_clientRequest.isImplicitCreateAllowed());
-
return request;
}
diff --git a/src/mongo/s/write_ops/batched_command_request.cpp b/src/mongo/s/write_ops/batched_command_request.cpp
index b7329bee890..93237f90bb2 100644
--- a/src/mongo/s/write_ops/batched_command_request.cpp
+++ b/src/mongo/s/write_ops/batched_command_request.cpp
@@ -39,7 +39,6 @@ namespace mongo {
namespace {
const auto kWriteConcern = "writeConcern"_sd;
-const auto kAllowImplicitCollectionCreation = "allowImplicitCollectionCreation"_sd;
template <class T>
BatchedCommandRequest constructBatchedCommandRequest(const OpMsgRequest& request) {
@@ -58,10 +57,6 @@ BatchedCommandRequest constructBatchedCommandRequest(const OpMsgRequest& request
batchRequest.setWriteConcern(writeConcernField.Obj());
}
- if (auto allowImplicitElement = request.body[kAllowImplicitCollectionCreation]) {
- batchRequest.setAllowImplicitCreate(allowImplicitElement.boolean());
- }
-
return batchRequest;
}
@@ -186,10 +181,6 @@ void BatchedCommandRequest::serialize(BSONObjBuilder* builder) const {
if (_writeConcern) {
builder->append(kWriteConcern, *_writeConcern);
}
-
- if (!_allowImplicitCollectionCreation) {
- builder->append(kAllowImplicitCollectionCreation, _allowImplicitCollectionCreation);
- }
}
BSONObj BatchedCommandRequest::toBSON() const {
diff --git a/src/mongo/s/write_ops/batched_command_request.h b/src/mongo/s/write_ops/batched_command_request.h
index 489ddaf0801..c8f537193b6 100644
--- a/src/mongo/s/write_ops/batched_command_request.h
+++ b/src/mongo/s/write_ops/batched_command_request.h
@@ -150,14 +150,6 @@ public:
BSONObj toBSON() const;
std::string toString() const;
- void setAllowImplicitCreate(bool doAllow) {
- _allowImplicitCollectionCreation = doAllow;
- }
-
- bool isImplicitCreateAllowed() const {
- return _allowImplicitCollectionCreation;
- }
-
/**
* Generates a new request, the same as the old, but with insert _ids if required.
*/
@@ -232,7 +224,6 @@ private:
boost::optional<DatabaseVersion> _dbVersion;
boost::optional<BSONObj> _writeConcern;
- bool _allowImplicitCollectionCreation = true;
};
/**