SERVER-92770 Remove `emptycapped` (#25439)

GitOrigin-RevId: 4498272aa5000aff8fc8effec2b3c8e96ba98ea6
This commit is contained in:
Gregory Noma 2024-07-31 10:20:11 -04:00 committed by MongoDB Bot
parent dd3697bf76
commit 5339a049c1
106 changed files with 32 additions and 562 deletions

View File

@ -55,7 +55,6 @@ selector:
- jstests/core/**/apitest_db.js
- jstests/core/**/bypass_doc_validation.js
- jstests/core/**/check_shard_index.js
- jstests/core/**/collection_truncate.js
- jstests/core/**/compact_keeps_indexes.js
- jstests/core/**/currentop.js
- jstests/core/**/dbhash.js

View File

@ -41,7 +41,6 @@ selector:
- jstests/core/**/awaitdata_getmore_cmd.js
- jstests/core/**/bypass_doc_validation.js
- jstests/core/**/check_shard_index.js
- jstests/core/**/collection_truncate.js
- jstests/core/**/compact_keeps_indexes.js
- jstests/core/**/currentop.js
- jstests/core/**/dbhash.js

View File

@ -49,7 +49,6 @@ selector:
- jstests/core/txns/**/*.js
- jstests/core/**/apitest_db.js
- jstests/core/**/check_shard_index.js
- jstests/core/**/collection_truncate.js
- jstests/core/**/compact_keeps_indexes.js
- jstests/core/**/currentop.js
- jstests/core/**/dbhash.js

View File

@ -92,7 +92,6 @@ selector:
- requires_profiling
- requires_auth
- uses_transactions
- requires_emptycapped
roots:
- jstests/core/**/*.js
test_kind: js_test

View File

@ -81,7 +81,6 @@ selector:
- jstests/core/**/awaitdata_getmore_cmd.js
- jstests/core/**/bypass_doc_validation.js
- jstests/core/**/check_shard_index.js
- jstests/core/**/collection_truncate.js
- jstests/core/**/compact_keeps_indexes.js
- jstests/core/**/currentop.js
- jstests/core/**/dbhash.js

View File

@ -81,7 +81,6 @@ selector:
- jstests/core/**/awaitdata_getmore_cmd.js
- jstests/core/**/bypass_doc_validation.js
- jstests/core/**/check_shard_index.js
- jstests/core/**/collection_truncate.js
- jstests/core/**/compact_keeps_indexes.js
- jstests/core/**/currentop.js
- jstests/core/**/dbhash.js

View File

@ -61,7 +61,6 @@ selector:
exclude_with_any_tags:
- assumes_standalone_mongod
- requires_profiling
- requires_emptycapped
- incompatible_with_preimages_by_default
roots:
- jstests/core/**/*.js

View File

@ -54,7 +54,6 @@ selector:
- jstests/core/query/mr/*.js
- jstests/core/**/apitest_db.js
- jstests/core/**/check_shard_index.js
- jstests/core/**/collection_truncate.js
- jstests/core/**/compact_keeps_indexes.js
- jstests/core/**/currentop.js
- jstests/core/**/dbhash.js

View File

@ -55,7 +55,6 @@ selector:
exclude_with_any_tags:
- assumes_standalone_mongod
- requires_profiling
- requires_emptycapped
roots:
- jstests/core/**/*.js
test_kind: js_test

View File

@ -46,7 +46,6 @@ selector:
- jstests/core/**/awaitdata_getmore_cmd.js
- jstests/core/**/bypass_doc_validation.js
- jstests/core/**/check_shard_index.js
- jstests/core/**/collection_truncate.js
- jstests/core/**/compact_keeps_indexes.js
- jstests/core/**/currentop.js
- jstests/core/**/dbhash.js

View File

@ -46,7 +46,6 @@ selector:
- jstests/core/**/awaitdata_getmore_cmd.js
- jstests/core/**/bypass_doc_validation.js
- jstests/core/**/check_shard_index.js
- jstests/core/**/collection_truncate.js
- jstests/core/**/compact_keeps_indexes.js
- jstests/core/**/currentop.js
- jstests/core/**/dbhash.js

View File

@ -42,7 +42,6 @@ selector:
- jstests/core/txns/**/*.js
- jstests/core/**/apitest_db.js
- jstests/core/**/check_shard_index.js
- jstests/core/**/collection_truncate.js
- jstests/core/**/compact_keeps_indexes.js
- jstests/core/**/currentop.js
- jstests/core/**/dbhash.js

View File

@ -42,7 +42,6 @@ selector:
- jstests/core/txns/**/*.js
- jstests/core/**/apitest_db.js
- jstests/core/**/check_shard_index.js
- jstests/core/**/collection_truncate.js
- jstests/core/**/compact_keeps_indexes.js
- jstests/core/**/currentop.js
- jstests/core/**/dbhash.js

View File

@ -78,6 +78,3 @@
# The following test tries to directly query secondaries, which fails if the secondary has been
# killed.
- jstests/core/**/column_store_index_compression.js
exclude_with_any_tags:
# emptycapped is not supported with rollback using recover-to-timestamp.
- requires_emptycapped

View File

@ -10,7 +10,6 @@ selector:
- jstests/core/**/awaitdata_getmore_cmd.js # capped collections.
- jstests/core/**/bypass_doc_validation.js # sharded $out output not permitted
- jstests/core/**/check_shard_index.js # checkShardingIndex.
- jstests/core/**/collection_truncate.js # emptycapped.
- jstests/core/**/compact_keeps_indexes.js # compact.
- jstests/core/**/currentop.js # uses fsync.
- jstests/core/**/dbhash.js # dbhash.

View File

@ -13,7 +13,6 @@ selector:
- jstests/core/**/awaitdata_getmore_cmd.js # capped collections.
- jstests/core/**/bypass_doc_validation.js # sharded $out output not permitted
- jstests/core/**/check_shard_index.js # checkShardingIndex.
- jstests/core/**/collection_truncate.js # emptycapped.
- jstests/core/**/compact_keeps_indexes.js # compact.
- jstests/core/**/currentop.js # uses fsync.
- jstests/core/**/dbhash.js # dbhash.

View File

@ -12,7 +12,6 @@ selector:
# mongos. This command or functionality is placed in a comment next to the failing test.
- jstests/core/**/apitest_db.js # serverStatus output doesn't have storageEngine
- jstests/core/**/check_shard_index.js # checkShardingIndex.
- jstests/core/**/collection_truncate.js # emptycapped.
- jstests/core/**/compact_keeps_indexes.js # compact.
- jstests/core/**/currentop.js # uses fsync.
- jstests/core/**/dbhash.js # dbhash.

View File

@ -14,7 +14,6 @@ selector:
# mongos. This command or functionality is placed in a comment next to the failing test.
- jstests/core/**/apitest_db.js # serverStatus output doesn't have storageEngine
- jstests/core/**/check_shard_index.js # checkShardingIndex.
- jstests/core/**/collection_truncate.js # emptycapped.
- jstests/core/**/compact_keeps_indexes.js # compact.
- jstests/core/**/currentop.js # uses fsync.
- jstests/core/**/dbhash.js # dbhash.

View File

@ -25,7 +25,6 @@ selector:
# mongos. This command or functionality is placed in a comment next to the failing test.
- jstests/core/**/apitest_db.js # serverStatus output doesn't have storageEngine.
- jstests/core/**/check_shard_index.js # checkShardingIndex.
- jstests/core/**/collection_truncate.js # emptycapped.
- jstests/core/**/compact_keeps_indexes.js # compact.
- jstests/core/**/currentop.js # uses fsync.
- jstests/core/**/dbhash.js # dbhash.

View File

@ -14,7 +14,6 @@ selector:
- jstests/core/**/awaitdata_getmore_cmd.js # capped collections.
- jstests/core/**/bypass_doc_validation.js # sharded $out output not permitted
- jstests/core/**/check_shard_index.js # checkShardingIndex.
- jstests/core/**/collection_truncate.js # emptycapped.
- jstests/core/**/compact_keeps_indexes.js # compact.
- jstests/core/**/currentop.js # uses fsync.
- jstests/core/**/dbhash.js # dbhash.

View File

@ -85,7 +85,6 @@ selector:
- jstests/core/**/collation_find_and_modify.js
- jstests/core/**/collation_plan_cache.js
- jstests/core/**/collation_update.js
- jstests/core/**/collection_truncate.js
- jstests/core/**/command_json_schema_field.js
- jstests/core/**/command_let_variables.js
- jstests/core/**/computed_projections.js

View File

@ -48,7 +48,6 @@ selector:
- jstests/core/**/awaitdata_getmore_cmd.js # capped collections.
- jstests/core/**/bypass_doc_validation.js # sharded $out output not permitted
- jstests/core/**/check_shard_index.js # checkShardingIndex.
- jstests/core/**/collection_truncate.js # emptycapped.
- jstests/core/**/compact_keeps_indexes.js # compact.
- jstests/core/**/currentop.js # uses fsync.
- jstests/core/**/dbhash.js # dbhash.

View File

@ -21,7 +21,6 @@ selector:
- jstests/core/**/awaitdata_getmore_cmd.js # capped collections.
- jstests/core/**/bypass_doc_validation.js # sharded $out output not permitted
- jstests/core/**/check_shard_index.js # checkShardingIndex.
- jstests/core/**/collection_truncate.js # emptycapped.
- jstests/core/**/compact_keeps_indexes.js # compact.
- jstests/core/**/currentop.js # uses fsync.
- jstests/core/**/dbhash.js # dbhash.

View File

@ -13,7 +13,6 @@ selector:
# mongos. This command or functionality is placed in a comment next to the failing test.
- jstests/core/**/apitest_db.js # serverStatus output doesn't have storageEngine.
- jstests/core/**/check_shard_index.js # checkShardingIndex.
- jstests/core/**/collection_truncate.js # emptycapped.
- jstests/core/**/compact_keeps_indexes.js # compact.
- jstests/core/**/currentop.js # uses fsync.
- jstests/core/**/dbhash.js # dbhash.

View File

@ -13,7 +13,6 @@ selector:
# mongos. This command or functionality is placed in a comment next to the failing test.
- jstests/core/**/apitest_db.js # serverStatus output doesn't have storageEngine.
- jstests/core/**/check_shard_index.js # checkShardingIndex.
- jstests/core/**/collection_truncate.js # emptycapped.
- jstests/core/**/compact_keeps_indexes.js # compact.
- jstests/core/**/currentop.js # uses fsync.
- jstests/core/**/dbhash.js # dbhash.

View File

@ -14,7 +14,6 @@ selector:
- jstests/core/**/apitest_db.js # serverStatus output doesn't have storageEngine.
- jstests/core/**/bypass_doc_validation.js # sharded $out output not permitted
- jstests/core/**/check_shard_index.js # checkShardingIndex.
- jstests/core/**/collection_truncate.js # emptycapped.
- jstests/core/**/compact_keeps_indexes.js # compact.
- jstests/core/**/currentop.js # uses fsync.
- jstests/core/**/dbhash.js # dbhash.

View File

@ -17,7 +17,6 @@ selector:
- jstests/core/**/awaitdata_getmore_cmd.js # capped collections.
- jstests/core/**/bypass_doc_validation.js # sharded $out output not permitted
- jstests/core/**/check_shard_index.js # checkShardingIndex.
- jstests/core/**/collection_truncate.js # emptycapped.
- jstests/core/**/compact_keeps_indexes.js # compact.
- jstests/core/**/currentop.js # uses fsync.
- jstests/core/**/dbhash.js # dbhash.

View File

@ -16,7 +16,6 @@ selector:
# mongos. This command or functionality is placed in a comment next to the failing test.
- jstests/core/**/apitest_db.js # serverStatus output doesn't have storageEngine.
- jstests/core/**/check_shard_index.js # checkShardingIndex.
- jstests/core/**/collection_truncate.js # emptycapped.
- jstests/core/**/compact_keeps_indexes.js # compact.
- jstests/core/**/currentop.js # uses fsync.
- jstests/core/**/dbhash.js # dbhash.

View File

@ -15,7 +15,6 @@ selector:
- jstests/core/**/awaitdata_getmore_cmd.js # capped collections.
- jstests/core/**/bypass_doc_validation.js # sharded $out output not permitted
- jstests/core/**/check_shard_index.js # checkShardingIndex.
- jstests/core/**/collection_truncate.js # emptycapped.
- jstests/core/**/compact_keeps_indexes.js # compact.
- jstests/core/**/currentop.js # uses fsync.
- jstests/core/**/dbhash.js # dbhash.

View File

@ -13,7 +13,6 @@ selector:
# mongos. This command or functionality is placed in a comment next to the failing test.
- jstests/core/**/apitest_db.js # serverStatus output doesn't have storageEngine.
- jstests/core/**/check_shard_index.js # checkShardingIndex.
- jstests/core/**/collection_truncate.js # emptycapped.
- jstests/core/**/compact_keeps_indexes.js # compact.
- jstests/core/**/currentop.js # uses fsync.
- jstests/core/**/dbhash.js # dbhash.

View File

@ -13,7 +13,6 @@ selector:
- jstests/core/**/awaitdata_getmore_cmd.js # capped collections.
- jstests/core/**/bypass_doc_validation.js # sharded $out output not permitted
- jstests/core/**/check_shard_index.js # checkShardingIndex.
- jstests/core/**/collection_truncate.js # emptycapped.
- jstests/core/**/compact_keeps_indexes.js # compact.
- jstests/core/**/currentop.js # uses fsync.
- jstests/core/**/dbhash.js # dbhash.

View File

@ -13,7 +13,6 @@ selector:
- jstests/core/**/awaitdata_getmore_cmd.js # capped collections.
- jstests/core/**/bypass_doc_validation.js # sharded $out output not permitted
- jstests/core/**/check_shard_index.js # checkShardingIndex.
- jstests/core/**/collection_truncate.js # emptycapped.
- jstests/core/**/compact_keeps_indexes.js # compact.
- jstests/core/**/currentop.js # uses fsync.
- jstests/core/**/dbhash.js # dbhash.

View File

@ -13,7 +13,6 @@ selector:
- jstests/core/**/awaitdata_getmore_cmd.js # capped collections.
- jstests/core/**/bypass_doc_validation.js # sharded $out output not permitted
- jstests/core/**/check_shard_index.js # checkShardingIndex.
- jstests/core/**/collection_truncate.js # emptycapped.
- jstests/core/**/compact_keeps_indexes.js # compact.
- jstests/core/**/currentop.js # uses fsync.
- jstests/core/**/dbhash.js # dbhash.

View File

@ -13,7 +13,6 @@ selector:
- jstests/core/**/awaitdata_getmore_cmd.js # capped collections.
- jstests/core/**/bypass_doc_validation.js # sharded $out output not permitted
- jstests/core/**/check_shard_index.js # checkShardingIndex.
- jstests/core/**/collection_truncate.js # emptycapped.
- jstests/core/**/compact_keeps_indexes.js # compact.
- jstests/core/**/currentop.js # uses fsync.
- jstests/core/**/dbhash.js # dbhash.

View File

@ -13,7 +13,6 @@ selector:
- jstests/core/**/awaitdata_getmore_cmd.js # capped collections.
- jstests/core/**/bypass_doc_validation.js # sharded $out output not permitted
- jstests/core/**/check_shard_index.js # checkShardingIndex.
- jstests/core/**/collection_truncate.js # emptycapped.
- jstests/core/**/compact_keeps_indexes.js # compact.
- jstests/core/**/currentop.js # uses fsync.
- jstests/core/**/dbhash.js # dbhash.

View File

@ -18,7 +18,6 @@ selector:
# mongos. This command or functionality is placed in a comment next to the failing test.
- jstests/core/**/apitest_db.js # serverStatus output doesn't have storageEngine.
- jstests/core/**/check_shard_index.js # checkShardingIndex.
- jstests/core/**/collection_truncate.js # emptycapped.
- jstests/core/**/compact_keeps_indexes.js # compact.
- jstests/core/**/currentop.js # uses fsync.
- jstests/core/**/dbhash.js # dbhash.

View File

@ -16,7 +16,6 @@ selector:
- jstests/replsets/buildindexes_false_with_system_indexes.js
- jstests/replsets/db_reads_while_recovering_all_commands.js
- jstests/replsets/disable_cluster_time_gossiping_in_unreadable_state.js
- jstests/replsets/emptycapped.js
- jstests/replsets/localhostAuthBypass.js
- jstests/replsets/rollback_auth.js
- jstests/replsets/user_management_wc.js

View File

@ -57,8 +57,6 @@ selector:
- requires_profiling
# capped collections are banned in Serverless
- requires_capped
# emptycapped command is blocked during tenant migration.
- requires_emptycapped
- tenant_migration_incompatible
##
# The next tag corresponds to the special error thrown by the set_read_preference_secondary.js

View File

@ -46,8 +46,6 @@ selector:
- requires_profiling
# capped collections are banned in Serverless
- requires_capped
# emptycapped command is blocked during tenant migration.
- requires_emptycapped
# Multi-updates that conflict with tenant migration are not retried by simulate_atlas_proxy.js.
- requires_multi_updates
# Full validation can cause ongoing queries to fail. This can affect the tenant migration

View File

@ -234,8 +234,6 @@ selector:
- requires_profiling
# capped collections are banned in Serverless
- requires_capped
# emptycapped command is blocked during tenant migration.
- requires_emptycapped
- tenant_migration_incompatible
# "Cowardly refusing to override read concern of command: ..."
- assumes_read_concern_unchanged

View File

@ -90,8 +90,6 @@ selector:
- requires_profiling
# capped collections are banned in Serverless
- requires_capped
# emptycapped command is blocked during shard split.
- requires_emptycapped
# Multi-updates that conflict with shard split are not retried by simulate_atlas_proxy.js.
- requires_multi_updates
##

View File

@ -37,8 +37,6 @@ selector:
- requires_profiling
# capped collections are banned in Serverless
- requires_capped
# emptycapped command is blocked during shard split.
- requires_emptycapped
# Multi-updates that conflict with shard split are not retried by simulate_atlas_proxy.js.
- requires_multi_updates
# Full validation can cause ongoing queries to fail. This can affect the shard split process.

View File

@ -109,8 +109,6 @@ selector:
- requires_profiling
# capped collections are banned in Serverless
- requires_capped
# emptycapped command is blocked during shard split.
- requires_emptycapped
# Multi-updates that conflict with shard split are not retried by simulate_atlas_proxy.js.
- requires_multi_updates
- tenant_migration_incompatible

View File

@ -228,8 +228,6 @@ selector:
- requires_profiling
# capped collections are banned in Serverless
- requires_capped
# emptycapped command is blocked during shard split.
- requires_emptycapped
- tenant_migration_incompatible
# "Cowardly refusing to override read concern of command: ..."
- assumes_read_concern_unchanged

View File

@ -103,8 +103,6 @@ selector:
- requires_profiling
# capped collections are banned in Serverless
- requires_capped
# emptycapped command is blocked during shard split.
- requires_emptycapped
# Multi-updates that conflict with shard split are not retried by simulate_atlas_proxy.js.
- requires_multi_updates
- tenant_migration_incompatible

View File

@ -103,8 +103,6 @@ selector:
- requires_profiling
# capped collections are banned in Serverless
- requires_capped
# emptycapped command is blocked during shard split.
- requires_emptycapped
# Multi-updates that conflict with shard split are not retried by simulate_atlas_proxy.js.
- requires_multi_updates
- tenant_migration_incompatible

View File

@ -13,7 +13,6 @@ selector:
- jstests/core/**/apitest_db.js # serverStatus output doesn't have storageEngine.
- jstests/core/**/bypass_doc_validation.js # sharded $out output not permitted
- jstests/core/**/check_shard_index.js # checkShardingIndex.
- jstests/core/**/collection_truncate.js # emptycapped.
- jstests/core/**/compact_keeps_indexes.js # compact.
- jstests/core/**/currentop.js # uses fsync.
- jstests/core/**/dbhash.js # dbhash.

View File

@ -13,7 +13,6 @@ selector:
- jstests/core/**/apitest_db.js # serverStatus output doesn't have storageEngine.
- jstests/core/**/bypass_doc_validation.js # sharded $out output not permitted
- jstests/core/**/check_shard_index.js # checkShardingIndex.
- jstests/core/**/collection_truncate.js # emptycapped.
- jstests/core/**/compact_keeps_indexes.js # compact.
- jstests/core/**/currentop.js # uses fsync.
- jstests/core/**/dbhash.js # dbhash.

View File

@ -15,7 +15,6 @@ selector:
- jstests/core/**/awaitdata_getmore_cmd.js # capped collections.
- jstests/core/**/bypass_doc_validation.js # sharded $out output not permitted
- jstests/core/**/check_shard_index.js # checkShardingIndex.
- jstests/core/**/collection_truncate.js # emptycapped.
- jstests/core/**/compact_keeps_indexes.js # compact.
- jstests/core/**/currentop.js # uses fsync.
- jstests/core/**/dbhash.js # dbhash.

View File

@ -15,7 +15,6 @@ selector:
- jstests/core/**/awaitdata_getmore_cmd.js # capped collections.
- jstests/core/**/bypass_doc_validation.js # sharded $out output not permitted
- jstests/core/**/check_shard_index.js # checkShardingIndex.
- jstests/core/**/collection_truncate.js # emptycapped.
- jstests/core/**/compact_keeps_indexes.js # compact.
- jstests/core/**/currentop.js # uses fsync.
- jstests/core/**/dbhash.js # dbhash.

View File

@ -14,7 +14,6 @@ selector:
- jstests/core/**/awaitdata_getmore_cmd.js # capped collections.
- jstests/core/**/bypass_doc_validation.js # sharded $out output not permitted
- jstests/core/**/check_shard_index.js # checkShardingIndex.
- jstests/core/**/collection_truncate.js # emptycapped.
- jstests/core/**/compact_keeps_indexes.js # compact.
- jstests/core/**/currentop.js # uses fsync.
- jstests/core/**/dbhash.js # dbhash.

View File

@ -21,7 +21,6 @@ selector:
- jstests/core/**/awaitdata_getmore_cmd.js # capped collections.
- jstests/core/**/bypass_doc_validation.js # sharded $out output not permitted
- jstests/core/**/check_shard_index.js # checkShardingIndex.
- jstests/core/**/collection_truncate.js # emptycapped.
- jstests/core/**/compact_keeps_indexes.js # compact.
- jstests/core/**/currentop.js # uses fsync.
- jstests/core/**/dbhash.js # dbhash.

View File

@ -49,7 +49,6 @@ selector:
- jstests/core/**/awaitdata_getmore_cmd.js # capped collections.
- jstests/core/**/bypass_doc_validation.js # sharded $out output not permitted
- jstests/core/**/check_shard_index.js # checkShardingIndex.
- jstests/core/**/collection_truncate.js # emptycapped.
- jstests/core/**/compact_keeps_indexes.js # compact.
- jstests/core/**/currentop.js # uses fsync.
- jstests/core/**/dbhash.js # dbhash.

View File

@ -12,7 +12,6 @@ selector:
# mongos. This command or functionality is placed in a comment next to the failing test.
- jstests/core/**/apitest_db.js # serverStatus output doesn't have storageEngine.
- jstests/core/**/check_shard_index.js # checkShardingIndex.
- jstests/core/**/collection_truncate.js # emptycapped.
- jstests/core/**/compact_keeps_indexes.js # compact.
- jstests/core/**/currentop.js # uses fsync.
- jstests/core/**/dbhash.js # dbhash.

View File

@ -23,7 +23,6 @@ selector:
# mongos. This command or functionality is placed in a comment next to the failing test.
- jstests/core/**/apitest_db.js # serverStatus output doesn't have storageEngine.
- jstests/core/**/check_shard_index.js # checkShardingIndex.
- jstests/core/**/collection_truncate.js # emptycapped.
- jstests/core/**/compact_keeps_indexes.js # compact.
- jstests/core/**/currentop.js # uses fsync.
- jstests/core/**/dbhash.js # dbhash.

View File

@ -13,7 +13,6 @@ selector:
# mongos. This command or functionality is placed in a comment next to the failing test.
- jstests/core/**/apitest_db.js # serverStatus output doesn't have storageEngine.
- jstests/core/**/check_shard_index.js # checkShardingIndex.
- jstests/core/**/collection_truncate.js # emptycapped.
- jstests/core/**/compact_keeps_indexes.js # compact.
- jstests/core/**/currentop.js # uses fsync.
- jstests/core/**/dbhash.js # dbhash.

View File

@ -13,7 +13,6 @@ selector:
# mongos. This command or functionality is placed in a comment next to the failing test.
- jstests/core/**/apitest_db.js # serverStatus output doesn't have storageEngine.
- jstests/core/**/check_shard_index.js # checkShardingIndex.
- jstests/core/**/collection_truncate.js # emptycapped.
- jstests/core/**/compact_keeps_indexes.js # compact.
- jstests/core/**/currentop.js # uses fsync.
- jstests/core/**/dbhash.js # dbhash.

View File

@ -15,7 +15,6 @@ selector:
# mongos. This command or functionality is placed in a comment next to the failing test.
- jstests/core/**/apitest_db.js # serverStatus output doesn't have storageEngine.
- jstests/core/**/check_shard_index.js # checkShardingIndex.
- jstests/core/**/collection_truncate.js # emptycapped.
- jstests/core/**/compact_keeps_indexes.js # compact.
- jstests/core/**/currentop.js # uses fsync.
- jstests/core/**/dbhash.js # dbhash.

View File

@ -18,7 +18,6 @@ selector:
# mongos. This command or functionality is placed in a comment next to the failing test.
- jstests/core/**/apitest_db.js # serverStatus output doesn't have storageEngine.
- jstests/core/**/check_shard_index.js # checkShardingIndex.
- jstests/core/**/collection_truncate.js # emptycapped.
- jstests/core/**/compact_keeps_indexes.js # compact.
- jstests/core/**/currentop.js # uses fsync.
- jstests/core/**/dbhash.js # dbhash.

View File

@ -19,7 +19,6 @@ selector:
# mongos. This command or functionality is placed in a comment next to the failing test.
- jstests/core/**/apitest_db.js # serverStatus output doesn't have storageEngine.
- jstests/core/**/check_shard_index.js # checkShardingIndex.
- jstests/core/**/collection_truncate.js # emptycapped.
- jstests/core/**/compact_keeps_indexes.js # compact.
- jstests/core/**/currentop.js # uses fsync.
- jstests/core/**/dbhash.js # dbhash.

View File

@ -47,7 +47,6 @@ selector:
# mongos. This command or functionality is placed in a comment next to the failing test.
- jstests/core/**/apitest_db.js # serverStatus output doesn't have storageEngine.
- jstests/core/**/check_shard_index.js # checkShardingIndex.
- jstests/core/**/collection_truncate.js # emptycapped.
- jstests/core/**/compact_keeps_indexes.js # compact.
- jstests/core/**/currentop.js # uses fsync.
- jstests/core/**/dbhash.js # dbhash.

View File

@ -49,8 +49,6 @@ selector:
- requires_profiling
# capped collections are banned in Serverless
- requires_capped
# emptycapped command is blocked during tenant migration.
- requires_emptycapped
# Multi-updates that conflict with tenant migration are not retried by simulate_atlas_proxy.js.
- requires_multi_updates
##

View File

@ -35,8 +35,6 @@ selector:
- requires_profiling
# capped collections are banned in Serverless
- requires_capped
# emptycapped command is blocked during tenant migration.
- requires_emptycapped
# Multi-updates that conflict with tenant migration are not retried by simulate_atlas_proxy.js.
- requires_multi_updates
# Full validation can cause ongoing queries to fail. This can affect the tenant migration

View File

@ -132,8 +132,6 @@ selector:
- requires_profiling
# capped collections are banned in Serverless
- requires_capped
# emptycapped command is blocked during tenant migration.
- requires_emptycapped
# Multi-updates that conflict with tenant migration are not retried by simulate_atlas_proxy.js.
- requires_multi_updates
- tenant_migration_incompatible

View File

@ -233,8 +233,6 @@ selector:
- requires_profiling
# capped collections are banned in Serverless
- requires_capped
# emptycapped command is blocked during tenant migration.
- requires_emptycapped
- tenant_migration_incompatible
# "Cowardly refusing to override read concern of command: ..."
- assumes_read_concern_unchanged

View File

@ -125,8 +125,6 @@ selector:
- requires_profiling
# capped collections are banned in Serverless
- requires_capped
# emptycapped command is blocked during tenant migration.
- requires_emptycapped
# Multi-updates that conflict with tenant migration are not retried by simulate_atlas_proxy.js.
- requires_multi_updates
- tenant_migration_incompatible

View File

@ -125,8 +125,6 @@ selector:
- requires_profiling
# capped collections are banned in Serverless
- requires_capped
# emptycapped command is blocked during tenant migration.
- requires_emptycapped
# Multi-updates that conflict with tenant migration are not retried by simulate_atlas_proxy.js.
- requires_multi_updates
- tenant_migration_incompatible

View File

@ -146,7 +146,6 @@ selector:
- jstests/core/query/plan_cache/query_solution_hash.js # locking
- jstests/core/sbe_plan_cache_autoparameterize_collscan.js # locking
- jstests/core/slice1.js # $slice
- jstests/core/write/collection_truncate.js # emptycapped
- jstests/core/write/find_and_modify/find_and_modify_server6865.js # $elemMatch
# Time-series collections are views which don't support map-reduce
- jstests/core/commands_namespace_parsing.js

View File

@ -16,7 +16,6 @@ selector:
# mongos. This command or functionality is placed in a comment next to the failing test.
- jstests/core/**/apitest_db.js # serverStatus output doesn't have storageEngine.
- jstests/core/**/check_shard_index.js # checkShardingIndex.
- jstests/core/**/collection_truncate.js # emptycapped.
- jstests/core/**/compact_keeps_indexes.js # compact.
- jstests/core/**/currentop.js # uses fsync.
- jstests/core/**/dbhash.js # dbhash.

View File

@ -437,7 +437,6 @@ or explicitly pass --installDir to the run subcommand of buildscripts/resmoke.py
_config.FUZZ_MONGOD_CONFIGS, _config.CONFIG_FUZZ_SEED, _config.MONGOD_SET_PARAMETERS
)
_config.EXCLUDE_WITH_ANY_TAGS.extend(["uses_compact"])
_config.EXCLUDE_WITH_ANY_TAGS.extend(["requires_emptycapped"])
_config.MONGOS_EXECUTABLE = _expand_user(config.pop("mongos_executable"))
mongos_set_parameters = config.pop("mongos_set_parameters")

View File

@ -18,7 +18,6 @@ parameter for testing.
Some often-used commands that are test-only:
- [configureFailPoint][fail_point_cmd]
- [emptyCapped][empty_capped_cmd]
- [replSetTest][repl_set_test_cmd]
- [sleep][sleep_cmd]

View File

@ -5280,7 +5280,7 @@ export const authCommandsLib = {
}
},
teardown: function(db) {
assert.commandWorked(db.oplog.rs.runCommand('emptycapped'));
assert.commandWorked(db.oplog.rs.deleteMany({}));
},
testcases: [
{

View File

@ -7,7 +7,6 @@ export const testOnlyCommands = [
'sleep',
'cpuload',
'captrunc',
'emptycapped',
'sysprofile',
'_dropConnectionsToMongot',
'_mongotConnPoolStats'

View File

@ -1,38 +0,0 @@
/**
* @tags: [
* # The test runs commands that are not allowed with security token: emptycapped.
* not_allowed_with_signed_security_token,
* requires_capped,
* requires_fastcount,
* requires_non_retryable_commands,
* uses_testing_only_commands,
* requires_emptycapped,
* # capped collections connot be sharded
* assumes_unsharded_collection,
* # emptycapped command is not supported on mongos
* assumes_against_mongod_not_mongos,
* no_selinux,
* ]
*/
let t = db.capped_empty;
t.drop();
db.createCollection(t.getName(), {capped: true, size: 100});
t.insert({x: 1});
t.insert({x: 2});
t.insert({x: 3});
t.createIndex({x: 1});
assert.eq(3, t.count());
t.runCommand("emptycapped");
assert.eq(0, t.count());
t.insert({x: 1});
t.insert({x: 2});
t.insert({x: 3});
assert.eq(3, t.count());

View File

@ -5,7 +5,6 @@
// assumes_unsharded_collection,
// assumes_superuser_permissions,
// does_not_support_stepdowns,
// requires_emptycapped,
// requires_fastcount,
// requires_getmore,
// requires_non_retryable_commands,
@ -410,10 +409,7 @@ let viewsCommandTests = {
dropSearchIndex: {skip: isUnrelated},
dropUser: {skip: isUnrelated},
echo: {skip: isUnrelated},
emptycapped: {
command: {emptycapped: "view"},
expectFailure: true,
},
emptycapped: {skip: "removed"}, // TODO (SERVER-92950): Remove this case.
enableSharding: {skip: "Tested as part of shardCollection"},
endSessions: {skip: isUnrelated},
explain: {command: {explain: {count: "view"}}},

View File

@ -1,71 +0,0 @@
/*
* SERVER-15033 truncate on a regular collection
*
* @tags: [
* # The test runs commands that are not allowed with security token: emptycapped.
* not_allowed_with_signed_security_token,
* requires_collstats,
* requires_non_retryable_commands,
* uses_testing_only_commands,
* requires_emptycapped,
* uses_full_validation,
* no_selinux,
* # TODO SERVER-60823 re-add transaction support
* does_not_support_transactions,
* # emptycapped calls WT_SESSION::truncate() which does untimestamped writes. This is unsafe in a
* # replica set or sharded clusters where timestamps are used. Run this test only in standalone
* # mode as timestamps aren't used.
* assumes_standalone_mongod,
* ]
*/
var t = db.getCollection('collection_truncate');
t.drop();
function truncate() {
// Until SERVER-15274 is implemented, this is the only way to truncate a collection.
assert.commandWorked(t.runCommand('emptycapped')); // works on non-capped as well.
}
function assertEmpty() {
var stats = t.stats();
assert.eq(stats.count, 0);
assert.eq(stats.size, 0);
assert.eq(t.count(), 0);
assert.eq(t.find().itcount(), 0);
var res = t.validate({full: true});
assert.commandWorked(res);
assert(res.valid, "failed validate(): " + tojson(res));
}
// Single record case.
t.insert({a: 1});
truncate();
assertEmpty();
// Multi-extent case.
const initialStorageSize = t.stats().storageSize;
const long_string = Array(1024 * 1024).toString();
let idx = 0;
while (t.stats().storageSize == initialStorageSize) {
let bulk = t.initializeUnorderedBulkOp();
const nDocs = 300;
for (let i = 0; i < nDocs; i++) {
bulk.insert({a: ++idx, text: long_string});
}
assert.commandWorked(bulk.execute());
}
jsTest.log("Initial storage size: " + initialStorageSize);
jsTest.log("Num inserts: " + idx);
jsTest.log("Storage size after inserts: " + t.stats().storageSize);
truncate();
assertEmpty();
// Already empty case.
truncate();
assertEmpty();

View File

@ -12,14 +12,6 @@ function runCommandOverride(conn, dbName, commandName, commandObj, func, makeFun
tojson(commandObj));
}
if (commandName == "emptycapped") {
// The emptycapped command is a test only command, so we do not expect users to run it with
// different WiredTiger configurations on mongod.
throw new Error(
"Cowardly refusing to run test that uses command 'emptycapped' with the config fuzzer enabled. " +
tojson(commandObj));
}
const serverResponse = func.apply(conn, makeFuncArgs(commandObj));
return serverResponse;
}

View File

@ -99,7 +99,6 @@ const kNonRetryableCommands = new Set([
"dropIndexes",
"dropRole",
"dropUser",
"emptycapped",
"godinsert",
"internalRenameIfOptionsAndIndexesMatch",
"updateRole",

View File

@ -68,7 +68,6 @@ export var kCommandsSupportingWriteConcern = new Set([
"dropIndexes",
"dropRole",
"dropUser",
"emptycapped",
"findAndModify",
"findandmodify",
"godinsert",

View File

@ -721,16 +721,6 @@ const allCommands = {
command: {dropUser: "foo"},
},
echo: {command: {echo: 1}},
emptycapped: {
command: {emptycapped: collName},
setUp: function(conn) {
assert.commandWorked(conn.getDB(dbName).runCommand({create: collName}));
},
teardown: function(conn) {
assert.commandWorked(conn.getDB(dbName).runCommand({drop: collName}));
},
doesNotRunOnMongos: true,
},
enableSharding: {
isShardedOnly: true,
isAdminCommand: true,

View File

@ -265,7 +265,6 @@ const allCommands = {
dropSearchIndex: {skip: isNotAUserDataRead},
dropUser: {skip: isPrimaryOnly},
echo: {skip: isNotAUserDataRead},
emptycapped: {skip: isPrimaryOnly},
endSessions: {skip: isNotAUserDataRead},
explain: {
command: {count: collName},

View File

@ -1,93 +0,0 @@
// This tests the emptycapped command in a replica set.
var rst = new ReplSetTest({nodes: 2});
rst.startSet();
rst.initiate();
var primaryTestDB = rst.getPrimary().getDB('test');
var primaryLocalDB = rst.getPrimary().getDB('local');
var primaryAdminDB = rst.getPrimary().getDB('admin');
var secondaryTestDB = rst.getSecondary().getDB('test');
// Truncate a non-capped collection.
assert.commandWorked(primaryTestDB.noncapped.insert({x: 1}));
assert.commandWorked(primaryTestDB.runCommand({emptycapped: 'noncapped'}));
assert.eq(primaryTestDB.noncapped.find().itcount(),
0,
"Expected 0 documents to exist after emptying the collection");
// Truncate a non-existent collection on a non-existent database.
assert.commandWorked(rst.getPrimary().getDB('nonexistent').dropDatabase());
assert.commandFailedWithCode(
rst.getPrimary().getDB('nonexistent').runCommand({emptycapped: 'nonexistent'}),
ErrorCodes.NamespaceNotFound);
// Truncate a non-existent collection.
primaryTestDB.nonexistent.drop();
assert.commandFailedWithCode(primaryTestDB.runCommand({emptycapped: 'nonexistent'}),
ErrorCodes.NamespaceNotFound);
// Truncate a capped collection.
assert.commandWorked(primaryTestDB.createCollection("capped", {capped: true, size: 4096}));
assert.commandWorked(primaryTestDB.capped.insert({}));
assert.eq(primaryTestDB.capped.find().itcount(), 1, "Expected 1 document to exist after an insert");
assert.commandWorked(primaryTestDB.runCommand({emptycapped: 'capped'}));
assert.eq(primaryTestDB.capped.find().itcount(),
0,
"Expected 0 documents to exist after emptying the collection");
// Truncate a capped collection on a secondary.
assert.commandFailedWithCode(secondaryTestDB.runCommand({emptycapped: 'capped'}),
ErrorCodes.NotWritablePrimary);
// Truncate the oplog.
assert.commandFailedWithCode(primaryLocalDB.runCommand({emptycapped: "oplog.rs"}),
ErrorCodes.OplogOperationUnsupported);
// Test system collections, which cannot be truncated except system.profile.
// Truncate the local system.js collection.
assert.commandWorked(primaryTestDB.system.js.insert({_id: "mystring", value: "var root = this;"}));
assert.commandFailedWithCode(primaryTestDB.runCommand({emptycapped: "system.js"}),
ErrorCodes.IllegalOperation);
// Truncate the system.profile collection.
assert.commandWorked(primaryTestDB.createCollection("system.profile", {capped: true, size: 4096}));
assert.commandWorked(primaryTestDB.runCommand({profile: 2}));
assert.commandWorked(primaryTestDB.runCommand({emptycapped: "system.profile"}));
assert.commandWorked(primaryTestDB.runCommand({profile: 0}));
assert(primaryTestDB.system.profile.drop(), "Failed to drop the system.profile collection");
// Truncate the local system.replset collection.
assert.commandFailedWithCode(primaryLocalDB.runCommand({emptycapped: "system.replset"}),
ErrorCodes.IllegalOperation);
// Test user & role management system collections.
assert.commandWorked(primaryAdminDB.runCommand({
createRole: "all1",
privileges: [{resource: {db: "", collection: ""}, actions: ["anyAction"]}],
roles: []
}));
assert.commandWorked(primaryAdminDB.runCommand(
{createUser: "root2", pwd: "pwd", roles: [{role: "root", db: "admin"}]}));
// TODO: Test system.backup_users
// Truncate the admin system.roles collection.
assert.commandFailedWithCode(primaryAdminDB.runCommand({emptycapped: "system.roles"}),
ErrorCodes.IllegalOperation);
// Truncate the admin system.users collection.
assert.commandFailedWithCode(primaryAdminDB.runCommand({emptycapped: "system.users"}),
ErrorCodes.IllegalOperation);
// Truncate the admin system.version collection.
assert.commandFailedWithCode(primaryAdminDB.runCommand({emptycapped: "system.version"}),
ErrorCodes.IllegalOperation);
// Truncate the local system.views collection.
assert.commandWorked(
primaryTestDB.runCommand({create: "view1", viewOn: "collection", pipeline: [{$match: {}}]}));
assert.commandFailedWithCode(primaryTestDB.runCommand({emptycapped: "system.views"}),
ErrorCodes.IllegalOperation);
rst.stopSet();

View File

@ -38,8 +38,5 @@ assert.commandWorked(primaryDB.foo.insert({}));
op = getLatestOp();
assert.commandWorked(primaryDB.runCommand({profile: 0}));
// emptycapped the collection
assert.commandWorked(primaryDB.runCommand({emptycapped: "system.profile"}));
assert.eq(op, getLatestOp(), "oplog entry created when system.profile was emptied via emptycapped");
assert(primaryDB.system.profile.drop());
rst.stopSet();

View File

@ -503,7 +503,6 @@ export const TenantMigrationConcurrentWriteUtil = {
dropRole: {skip: isAuthCommand},
dropUser: {skip: isAuthCommand},
echo: {skip: isNotRunOnUserDatabase},
emptycapped: {skip: isNotSupportedInServerless},
endSessions: {skip: isNotRunOnUserDatabase},
explain: {skip: isNotRunOnUserDatabase},
features: {skip: isNotRunOnUserDatabase},

View File

@ -597,16 +597,6 @@ const allCommands = {
shouldFail: false
},
echo: {command: {echo: 1}, shouldFail: false},
emptycapped: {
setUp: function(mongoS) {
assert.commandWorked(mongoS.getDB(dbName).runCommand({create: collName}));
},
command: {emptycapped: collName},
shouldFail: true,
teardown: function(mongoS) {
assert.commandWorked(mongoS.getDB(dbName).runCommand({drop: collName}));
},
},
enableSharding: {
skip: requiresMongoS,
},

View File

@ -514,7 +514,6 @@ let testCases = {
useLogs: true,
},
echo: {skip: "does not accept read or write concern"},
emptycapped: {skip: "test command"},
enableSharding: {skip: "does not accept read or write concern"},
endSessions: {skip: "does not accept read or write concern"},
explain: {skip: "TODO SERVER-45478"},
@ -954,8 +953,9 @@ function createProfileFilterForTestCase(test, targetId, explicitRWC) {
function runScenario(
desc, conn, regularCheckConn, configSvrCheckConn, {explicitRWC, explicitProvenance = false}) {
let runCommandTest = function(cmdName, test) {
// These commands were removed but break this test in multiversion
if (cmdName === "getFreeMonitoringStatus" || cmdName === "setFreeMonitoring") {
// The emptycapped command was removed but breaks this test in multiversion.
// TODO (SERVER-92950): Remove this check.
if (cmdName == "emptycapped") {
return;
}

View File

@ -227,7 +227,6 @@ let testCases = {
dropSearchIndex: {skip: "primary only"},
dropUser: {skip: "primary only"},
echo: {skip: "does not return user data"},
emptycapped: {skip: "primary only"},
enableSharding: {skip: "primary only"},
endSessions: {skip: "does not return user data"},
explain: {skip: "test case to be added"},

View File

@ -243,7 +243,6 @@ let testCases = {
dropSearchIndex: {skip: "does not return user data"},
dropUser: {skip: "primary only"},
echo: {skip: "does not return user data"},
emptycapped: {skip: "primary only"},
enableSharding: {skip: "primary only"},
endSessions: {skip: "does not return user data"},
explain: {skip: "test case to be added"},

View File

@ -237,7 +237,6 @@ let testCases = {
dropSearchIndex: {skip: "does not return user data"},
dropUser: {skip: "primary only"},
echo: {skip: "does not return user data"},
emptycapped: {skip: "primary only"},
enableSharding: {skip: "primary only"},
endSessions: {skip: "does not return user data"},
explain: {skip: "test case to be added"},

View File

@ -97,7 +97,7 @@ enums:
dropRole : "dropRole"
dropSearchIndex : "dropSearchIndex"
dropUser : "dropUser"
emptycapped : "emptycapped"
emptycapped : "emptycapped" # Deprecated (backwards compatibility)
enableProfiler : "enableProfiler"
enableSharding : "enableSharding"
exportCollection : "exportCollection"

View File

@ -224,17 +224,6 @@ void AuthOpObserver::onImportCollection(OperationContext* opCtx,
->logOp(opCtx, "m", nss, catalogEntry, &storageMetadata);
}
void AuthOpObserver::onEmptyCapped(OperationContext* opCtx,
const NamespaceString& collectionName,
const UUID& uuid) {
const auto cmdNss = collectionName.getCommandNS();
const auto cmdObj = BSON("emptycapped" << collectionName.coll());
dassert(opCtx->getService()->role().has(ClusterRole::ShardServer));
AuthorizationManager::get(opCtx->getService())->logOp(opCtx, "c", cmdNss, cmdObj, nullptr);
}
void AuthOpObserver::onReplicationRollback(OperationContext* opCtx,
const RollbackObserverInfo& rbInfo) {
// Invalidate any in-memory auth data if necessary.

View File

@ -151,11 +151,6 @@ public:
const boost::optional<UUID>& dropTargetUUID,
bool stayTemp) final;
void onEmptyCapped(OperationContext* opCtx,
const NamespaceString& collectionName,
const UUID& uuid) final;
void onReplicationRollback(OperationContext* opCtx, const RollbackObserverInfo& rbInfo) final;
};

View File

@ -83,59 +83,6 @@
namespace mongo {
Status emptyCapped(OperationContext* opCtx, const NamespaceString& collectionName) {
AutoGetDb autoDb(opCtx, collectionName.dbName(), MODE_X);
bool userInitiatedWritesAndNotPrimary = opCtx->writesAreReplicated() &&
!repl::ReplicationCoordinator::get(opCtx)->canAcceptWritesFor(opCtx, collectionName);
if (userInitiatedWritesAndNotPrimary) {
return Status(ErrorCodes::NotWritablePrimary,
str::stream() << "Not primary while truncating collection: "
<< collectionName.toStringForErrorMsg());
}
Database* db = autoDb.getDb();
uassert(ErrorCodes::NamespaceNotFound, "no such database", db);
CollectionWriter collection(opCtx, collectionName);
uassert(ErrorCodes::CommandNotSupportedOnView,
str::stream() << "emptycapped not supported on view: "
<< collectionName.toStringForErrorMsg(),
collection || !CollectionCatalog::get(opCtx)->lookupView(opCtx, collectionName));
uassert(ErrorCodes::NamespaceNotFound, "no such collection", collection);
if (collectionName.isSystem() && !collectionName.isSystemDotProfile()) {
return Status(ErrorCodes::IllegalOperation,
str::stream() << "Cannot truncate a system collection: "
<< collectionName.toStringForErrorMsg());
}
if ((repl::ReplicationCoordinator::get(opCtx)->getSettings().isReplSet()) &&
collectionName.isOplog()) {
return Status(ErrorCodes::OplogOperationUnsupported,
str::stream() << "Cannot truncate a live oplog while replicating: "
<< collectionName.toStringForErrorMsg());
}
IndexBuildsCoordinator::get(opCtx)->assertNoIndexBuildInProgForCollection(collection->uuid());
WriteUnitOfWork wuow(opCtx);
auto writableCollection = collection.getWritableCollection(opCtx);
Status status = writableCollection->truncate(opCtx);
if (!status.isOK()) {
return status;
}
const auto service = opCtx->getServiceContext();
service->getOpObserver()->onEmptyCapped(opCtx, collection->ns(), collection->uuid());
wuow.commit();
return Status::OK();
}
void cloneCollectionAsCapped(OperationContext* opCtx,
Database* db,
const NamespaceString& fromNss,

View File

@ -37,11 +37,6 @@ class Database;
class NamespaceString;
class OperationContext;
/**
* Drops all documents contained in the capped collection, "collectionName".
*/
Status emptyCapped(OperationContext* opCtx, const NamespaceString& collectionName);
/**
* Clones the collection "shortFrom" to the capped collection "shortTo" with a size of "size".
* If targetUUID is provided, then the newly capped collection will get that UUID. Otherwise, the

View File

@ -243,37 +243,6 @@ public:
MONGO_REGISTER_COMMAND(CapTrunc).testOnly().forShard();
class EmptyCapped : public BasicCommand {
public:
EmptyCapped() : BasicCommand("emptycapped") {}
AllowedOnSecondary secondaryAllowed(ServiceContext*) const override {
return AllowedOnSecondary::kNever;
}
bool supportsWriteConcern(const BSONObj& cmd) const override {
return true;
}
// No auth needed because it only works when enabled via command line.
Status checkAuthForOperation(OperationContext*,
const DatabaseName&,
const BSONObj&) const override {
return Status::OK();
}
bool run(OperationContext* opCtx,
const DatabaseName& dbName,
const BSONObj& cmdObj,
BSONObjBuilder& result) override {
const NamespaceString nss = CommandHelpers::parseNsCollectionRequired(dbName, cmdObj);
uassertStatusOK(emptyCapped(opCtx, nss));
return true;
}
};
MONGO_REGISTER_COMMAND(EmptyCapped).testOnly().forShard();
class DurableHistoryReplicatedTestCmd : public BasicCommand {
public:
DurableHistoryReplicatedTestCmd() : BasicCommand("pinHistoryReplicated") {}

View File

@ -489,10 +489,6 @@ public:
const BSONObj& storageMetadata,
bool isDryRun) = 0;
virtual void onEmptyCapped(OperationContext* opCtx,
const NamespaceString& collectionName,
const UUID& uuid) = 0;
/**
* The onTransaction Start method is called at the beginning of a multi-document transaction.
* It must not be called when the transaction is already in progress.

View File

@ -1541,24 +1541,6 @@ void OpObserverImpl::onImportCollection(OperationContext* opCtx,
logOperation(opCtx, &oplogEntry, true /*assignWallClockTime*/, _operationLogger.get());
}
void OpObserverImpl::onEmptyCapped(OperationContext* opCtx,
const NamespaceString& collectionName,
const UUID& uuid) {
if (repl::ReplicationCoordinator::get(opCtx)->isOplogDisabledFor(opCtx, collectionName)) {
return;
}
MutableOplogEntry oplogEntry;
oplogEntry.setOpType(repl::OpTypeEnum::kCommand);
oplogEntry.setTid(collectionName.tenantId());
oplogEntry.setNss(collectionName.getCommandNS());
oplogEntry.setUuid(uuid);
oplogEntry.setObject(BSON("emptycapped" << collectionName.coll()));
logOperation(opCtx, &oplogEntry, true /*assignWallClockTime*/, _operationLogger.get());
}
namespace {

View File

@ -220,9 +220,6 @@ public:
const BSONObj& catalogEntry,
const BSONObj& storageMetadata,
bool isDryRun) final;
void onEmptyCapped(OperationContext* opCtx,
const NamespaceString& collectionName,
const UUID& uuid) final;
void onTransactionStart(OperationContext* opCtx) final;
void onUnpreparedTransactionCommit(
OperationContext* opCtx,

View File

@ -211,11 +211,6 @@ public:
const boost::optional<UUID>& dropTargetUUID,
bool stayTemp) override {}
void onEmptyCapped(OperationContext* opCtx,
const NamespaceString& collectionName,
const UUID& uuid) override {}
void onTransactionStart(OperationContext* opCtx) override {}
void onUnpreparedTransactionCommit(

View File

@ -491,14 +491,6 @@ public:
opCtx, fromCollection, toCollection, uuid, dropTargetUUID, stayTemp);
}
void onEmptyCapped(OperationContext* const opCtx,
const NamespaceString& collectionName,
const UUID& uuid) override {
ReservedTimes times{opCtx};
for (auto& o : _observers)
o->onEmptyCapped(opCtx, collectionName, uuid);
}
void onTransactionStart(OperationContext* opCtx) override {
ReservedTimes times{opCtx};
for (auto& o : _observers) {

Some files were not shown because too many files have changed in this diff Show More