diff --git a/buildscripts/resmokeconfig/matrix_suites/generated_suites/bulk_write_sharded_causally_consistent_jscore_passthrough.yml b/buildscripts/resmokeconfig/matrix_suites/generated_suites/bulk_write_sharded_causally_consistent_jscore_passthrough.yml index 889bddc4484..b628363ef4b 100644 --- a/buildscripts/resmokeconfig/matrix_suites/generated_suites/bulk_write_sharded_causally_consistent_jscore_passthrough.yml +++ b/buildscripts/resmokeconfig/matrix_suites/generated_suites/bulk_write_sharded_causally_consistent_jscore_passthrough.yml @@ -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 diff --git a/buildscripts/resmokeconfig/matrix_suites/generated_suites/bulk_write_sharded_collections_jscore_passthrough.yml b/buildscripts/resmokeconfig/matrix_suites/generated_suites/bulk_write_sharded_collections_jscore_passthrough.yml index 58c4875639a..c7e342681da 100644 --- a/buildscripts/resmokeconfig/matrix_suites/generated_suites/bulk_write_sharded_collections_jscore_passthrough.yml +++ b/buildscripts/resmokeconfig/matrix_suites/generated_suites/bulk_write_sharded_collections_jscore_passthrough.yml @@ -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 diff --git a/buildscripts/resmokeconfig/matrix_suites/generated_suites/bulk_write_sharded_multi_stmt_txn_jscore_passthrough.yml b/buildscripts/resmokeconfig/matrix_suites/generated_suites/bulk_write_sharded_multi_stmt_txn_jscore_passthrough.yml index bae3ee8362c..4b6edfcf9b8 100644 --- a/buildscripts/resmokeconfig/matrix_suites/generated_suites/bulk_write_sharded_multi_stmt_txn_jscore_passthrough.yml +++ b/buildscripts/resmokeconfig/matrix_suites/generated_suites/bulk_write_sharded_multi_stmt_txn_jscore_passthrough.yml @@ -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 diff --git a/buildscripts/resmokeconfig/matrix_suites/generated_suites/change_streams_change_collection_replica_sets_kill_secondary_jscore_passthrough.yml b/buildscripts/resmokeconfig/matrix_suites/generated_suites/change_streams_change_collection_replica_sets_kill_secondary_jscore_passthrough.yml index bd2aa1f6db2..a905f3e76cd 100644 --- a/buildscripts/resmokeconfig/matrix_suites/generated_suites/change_streams_change_collection_replica_sets_kill_secondary_jscore_passthrough.yml +++ b/buildscripts/resmokeconfig/matrix_suites/generated_suites/change_streams_change_collection_replica_sets_kill_secondary_jscore_passthrough.yml @@ -92,7 +92,6 @@ selector: - requires_profiling - requires_auth - uses_transactions - - requires_emptycapped roots: - jstests/core/**/*.js test_kind: js_test diff --git a/buildscripts/resmokeconfig/matrix_suites/generated_suites/change_streams_downgrade_last_continuous_new_old_old_new.yml b/buildscripts/resmokeconfig/matrix_suites/generated_suites/change_streams_downgrade_last_continuous_new_old_old_new.yml index 6ffedc778e7..d4b15d64bc5 100644 --- a/buildscripts/resmokeconfig/matrix_suites/generated_suites/change_streams_downgrade_last_continuous_new_old_old_new.yml +++ b/buildscripts/resmokeconfig/matrix_suites/generated_suites/change_streams_downgrade_last_continuous_new_old_old_new.yml @@ -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 diff --git a/buildscripts/resmokeconfig/matrix_suites/generated_suites/change_streams_downgrade_last_lts_new_old_old_new.yml b/buildscripts/resmokeconfig/matrix_suites/generated_suites/change_streams_downgrade_last_lts_new_old_old_new.yml index f070976e518..30340559e7b 100644 --- a/buildscripts/resmokeconfig/matrix_suites/generated_suites/change_streams_downgrade_last_lts_new_old_old_new.yml +++ b/buildscripts/resmokeconfig/matrix_suites/generated_suites/change_streams_downgrade_last_lts_new_old_old_new.yml @@ -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 diff --git a/buildscripts/resmokeconfig/matrix_suites/generated_suites/change_streams_pre_images_replica_sets_kill_secondary_jscore_passthrough.yml b/buildscripts/resmokeconfig/matrix_suites/generated_suites/change_streams_pre_images_replica_sets_kill_secondary_jscore_passthrough.yml index 66045f15a72..2cad82d0066 100644 --- a/buildscripts/resmokeconfig/matrix_suites/generated_suites/change_streams_pre_images_replica_sets_kill_secondary_jscore_passthrough.yml +++ b/buildscripts/resmokeconfig/matrix_suites/generated_suites/change_streams_pre_images_replica_sets_kill_secondary_jscore_passthrough.yml @@ -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 diff --git a/buildscripts/resmokeconfig/matrix_suites/generated_suites/embedded_router_jscore_passthrough_with_balancer.yml b/buildscripts/resmokeconfig/matrix_suites/generated_suites/embedded_router_jscore_passthrough_with_balancer.yml index 74a82261079..1b40fccd913 100644 --- a/buildscripts/resmokeconfig/matrix_suites/generated_suites/embedded_router_jscore_passthrough_with_balancer.yml +++ b/buildscripts/resmokeconfig/matrix_suites/generated_suites/embedded_router_jscore_passthrough_with_balancer.yml @@ -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 diff --git a/buildscripts/resmokeconfig/matrix_suites/generated_suites/replica_sets_kill_secondaries_jscore_passthrough.yml b/buildscripts/resmokeconfig/matrix_suites/generated_suites/replica_sets_kill_secondaries_jscore_passthrough.yml index 8695f75e8fe..edcbfb404a6 100644 --- a/buildscripts/resmokeconfig/matrix_suites/generated_suites/replica_sets_kill_secondaries_jscore_passthrough.yml +++ b/buildscripts/resmokeconfig/matrix_suites/generated_suites/replica_sets_kill_secondaries_jscore_passthrough.yml @@ -55,7 +55,6 @@ selector: exclude_with_any_tags: - assumes_standalone_mongod - requires_profiling - - requires_emptycapped roots: - jstests/core/**/*.js test_kind: js_test diff --git a/buildscripts/resmokeconfig/matrix_suites/generated_suites/sharded_collections_jscore_passthrough_last_continuous_new_old_old_new.yml b/buildscripts/resmokeconfig/matrix_suites/generated_suites/sharded_collections_jscore_passthrough_last_continuous_new_old_old_new.yml index 3da3ac2466d..eb727f7cc43 100644 --- a/buildscripts/resmokeconfig/matrix_suites/generated_suites/sharded_collections_jscore_passthrough_last_continuous_new_old_old_new.yml +++ b/buildscripts/resmokeconfig/matrix_suites/generated_suites/sharded_collections_jscore_passthrough_last_continuous_new_old_old_new.yml @@ -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 diff --git a/buildscripts/resmokeconfig/matrix_suites/generated_suites/sharded_collections_jscore_passthrough_last_lts_new_old_old_new.yml b/buildscripts/resmokeconfig/matrix_suites/generated_suites/sharded_collections_jscore_passthrough_last_lts_new_old_old_new.yml index dbc81cbe635..18d9b1200ec 100644 --- a/buildscripts/resmokeconfig/matrix_suites/generated_suites/sharded_collections_jscore_passthrough_last_lts_new_old_old_new.yml +++ b/buildscripts/resmokeconfig/matrix_suites/generated_suites/sharded_collections_jscore_passthrough_last_lts_new_old_old_new.yml @@ -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 diff --git a/buildscripts/resmokeconfig/matrix_suites/generated_suites/sharding_jscore_passthrough_last_continuous_new_old_old_new.yml b/buildscripts/resmokeconfig/matrix_suites/generated_suites/sharding_jscore_passthrough_last_continuous_new_old_old_new.yml index 6026a26d546..e627eac0160 100644 --- a/buildscripts/resmokeconfig/matrix_suites/generated_suites/sharding_jscore_passthrough_last_continuous_new_old_old_new.yml +++ b/buildscripts/resmokeconfig/matrix_suites/generated_suites/sharding_jscore_passthrough_last_continuous_new_old_old_new.yml @@ -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 diff --git a/buildscripts/resmokeconfig/matrix_suites/generated_suites/sharding_jscore_passthrough_last_lts_new_old_old_new.yml b/buildscripts/resmokeconfig/matrix_suites/generated_suites/sharding_jscore_passthrough_last_lts_new_old_old_new.yml index ce210870004..2880d25930b 100644 --- a/buildscripts/resmokeconfig/matrix_suites/generated_suites/sharding_jscore_passthrough_last_lts_new_old_old_new.yml +++ b/buildscripts/resmokeconfig/matrix_suites/generated_suites/sharding_jscore_passthrough_last_lts_new_old_old_new.yml @@ -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 diff --git a/buildscripts/resmokeconfig/matrix_suites/overrides/replica_sets_kill_secondary.yml b/buildscripts/resmokeconfig/matrix_suites/overrides/replica_sets_kill_secondary.yml index 4249cf6c045..8bfd9f0a2da 100644 --- a/buildscripts/resmokeconfig/matrix_suites/overrides/replica_sets_kill_secondary.yml +++ b/buildscripts/resmokeconfig/matrix_suites/overrides/replica_sets_kill_secondary.yml @@ -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 diff --git a/buildscripts/resmokeconfig/suites/analyze_shard_key_jscore_passthrough.yml b/buildscripts/resmokeconfig/suites/analyze_shard_key_jscore_passthrough.yml index 4b2e791fc8f..78105ffc939 100644 --- a/buildscripts/resmokeconfig/suites/analyze_shard_key_jscore_passthrough.yml +++ b/buildscripts/resmokeconfig/suites/analyze_shard_key_jscore_passthrough.yml @@ -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. diff --git a/buildscripts/resmokeconfig/suites/bulk_write_multi_op_sharded_collections_jscore_passthrough.yml b/buildscripts/resmokeconfig/suites/bulk_write_multi_op_sharded_collections_jscore_passthrough.yml index 12771e76e3e..6897cc66e66 100644 --- a/buildscripts/resmokeconfig/suites/bulk_write_multi_op_sharded_collections_jscore_passthrough.yml +++ b/buildscripts/resmokeconfig/suites/bulk_write_multi_op_sharded_collections_jscore_passthrough.yml @@ -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. diff --git a/buildscripts/resmokeconfig/suites/causally_consistent_hedged_reads_jscore_passthrough.yml b/buildscripts/resmokeconfig/suites/causally_consistent_hedged_reads_jscore_passthrough.yml index 0661a3a5441..944f2e365a9 100644 --- a/buildscripts/resmokeconfig/suites/causally_consistent_hedged_reads_jscore_passthrough.yml +++ b/buildscripts/resmokeconfig/suites/causally_consistent_hedged_reads_jscore_passthrough.yml @@ -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. diff --git a/buildscripts/resmokeconfig/suites/causally_consistent_jscore_passthrough.yml b/buildscripts/resmokeconfig/suites/causally_consistent_jscore_passthrough.yml index 120da9a3be2..9eff6f310a2 100644 --- a/buildscripts/resmokeconfig/suites/causally_consistent_jscore_passthrough.yml +++ b/buildscripts/resmokeconfig/suites/causally_consistent_jscore_passthrough.yml @@ -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. diff --git a/buildscripts/resmokeconfig/suites/causally_consistent_jscore_passthrough_auth.yml b/buildscripts/resmokeconfig/suites/causally_consistent_jscore_passthrough_auth.yml index 0c24c3a2cfa..e2620a37a10 100644 --- a/buildscripts/resmokeconfig/suites/causally_consistent_jscore_passthrough_auth.yml +++ b/buildscripts/resmokeconfig/suites/causally_consistent_jscore_passthrough_auth.yml @@ -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. diff --git a/buildscripts/resmokeconfig/suites/change_streams_downgrade.yml b/buildscripts/resmokeconfig/suites/change_streams_downgrade.yml index 1834863aa63..811f0478fd4 100644 --- a/buildscripts/resmokeconfig/suites/change_streams_downgrade.yml +++ b/buildscripts/resmokeconfig/suites/change_streams_downgrade.yml @@ -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. diff --git a/buildscripts/resmokeconfig/suites/cst_jscore_passthrough.yml b/buildscripts/resmokeconfig/suites/cst_jscore_passthrough.yml index 1472bd874cb..adb932cf879 100644 --- a/buildscripts/resmokeconfig/suites/cst_jscore_passthrough.yml +++ b/buildscripts/resmokeconfig/suites/cst_jscore_passthrough.yml @@ -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 diff --git a/buildscripts/resmokeconfig/suites/cursor_hints_to_query_settings_sharded_collections_passthrough.yml b/buildscripts/resmokeconfig/suites/cursor_hints_to_query_settings_sharded_collections_passthrough.yml index 8a4305ce590..a1a343cbb85 100644 --- a/buildscripts/resmokeconfig/suites/cursor_hints_to_query_settings_sharded_collections_passthrough.yml +++ b/buildscripts/resmokeconfig/suites/cursor_hints_to_query_settings_sharded_collections_passthrough.yml @@ -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. diff --git a/buildscripts/resmokeconfig/suites/cursor_hints_to_query_settings_unsharded_collections_passthrough.yml b/buildscripts/resmokeconfig/suites/cursor_hints_to_query_settings_unsharded_collections_passthrough.yml index 36f18555f50..56819ec4d27 100644 --- a/buildscripts/resmokeconfig/suites/cursor_hints_to_query_settings_unsharded_collections_passthrough.yml +++ b/buildscripts/resmokeconfig/suites/cursor_hints_to_query_settings_unsharded_collections_passthrough.yml @@ -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. diff --git a/buildscripts/resmokeconfig/suites/embedded_router_jscore_passthrough.yml b/buildscripts/resmokeconfig/suites/embedded_router_jscore_passthrough.yml index 7b43946c6c8..d90e8f26ed1 100644 --- a/buildscripts/resmokeconfig/suites/embedded_router_jscore_passthrough.yml +++ b/buildscripts/resmokeconfig/suites/embedded_router_jscore_passthrough.yml @@ -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. diff --git a/buildscripts/resmokeconfig/suites/embedded_router_jscore_passthrough_with_config_shard.yml b/buildscripts/resmokeconfig/suites/embedded_router_jscore_passthrough_with_config_shard.yml index 14c6d651edb..736b549d4c9 100644 --- a/buildscripts/resmokeconfig/suites/embedded_router_jscore_passthrough_with_config_shard.yml +++ b/buildscripts/resmokeconfig/suites/embedded_router_jscore_passthrough_with_config_shard.yml @@ -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. diff --git a/buildscripts/resmokeconfig/suites/embedded_router_sharded_collections_jscore_passthrough.yml b/buildscripts/resmokeconfig/suites/embedded_router_sharded_collections_jscore_passthrough.yml index 3199075d7c7..57dee90cb65 100644 --- a/buildscripts/resmokeconfig/suites/embedded_router_sharded_collections_jscore_passthrough.yml +++ b/buildscripts/resmokeconfig/suites/embedded_router_sharded_collections_jscore_passthrough.yml @@ -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. diff --git a/buildscripts/resmokeconfig/suites/fcv_upgrade_downgrade_sharded_collections_jscore_passthrough.yml b/buildscripts/resmokeconfig/suites/fcv_upgrade_downgrade_sharded_collections_jscore_passthrough.yml index 102251d2c75..be35e0a7cd6 100644 --- a/buildscripts/resmokeconfig/suites/fcv_upgrade_downgrade_sharded_collections_jscore_passthrough.yml +++ b/buildscripts/resmokeconfig/suites/fcv_upgrade_downgrade_sharded_collections_jscore_passthrough.yml @@ -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. diff --git a/buildscripts/resmokeconfig/suites/fcv_upgrade_downgrade_sharding_jscore_passthrough.yml b/buildscripts/resmokeconfig/suites/fcv_upgrade_downgrade_sharding_jscore_passthrough.yml index cf1b81a89d2..78e76e5b572 100644 --- a/buildscripts/resmokeconfig/suites/fcv_upgrade_downgrade_sharding_jscore_passthrough.yml +++ b/buildscripts/resmokeconfig/suites/fcv_upgrade_downgrade_sharding_jscore_passthrough.yml @@ -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. diff --git a/buildscripts/resmokeconfig/suites/magic_restore_sharded_collections_jscore_passthrough.yml b/buildscripts/resmokeconfig/suites/magic_restore_sharded_collections_jscore_passthrough.yml index 1cbfe4d6521..5dd61dbc243 100644 --- a/buildscripts/resmokeconfig/suites/magic_restore_sharded_collections_jscore_passthrough.yml +++ b/buildscripts/resmokeconfig/suites/magic_restore_sharded_collections_jscore_passthrough.yml @@ -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. diff --git a/buildscripts/resmokeconfig/suites/magic_restore_sharding_jscore_passthrough.yml b/buildscripts/resmokeconfig/suites/magic_restore_sharding_jscore_passthrough.yml index 055438d9a1b..b0164ba7056 100644 --- a/buildscripts/resmokeconfig/suites/magic_restore_sharding_jscore_passthrough.yml +++ b/buildscripts/resmokeconfig/suites/magic_restore_sharding_jscore_passthrough.yml @@ -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. diff --git a/buildscripts/resmokeconfig/suites/multi_shard_local_read_write_multi_stmt_txn_jscore_passthrough.yml b/buildscripts/resmokeconfig/suites/multi_shard_local_read_write_multi_stmt_txn_jscore_passthrough.yml index 847d587640d..11256138ba6 100644 --- a/buildscripts/resmokeconfig/suites/multi_shard_local_read_write_multi_stmt_txn_jscore_passthrough.yml +++ b/buildscripts/resmokeconfig/suites/multi_shard_local_read_write_multi_stmt_txn_jscore_passthrough.yml @@ -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. diff --git a/buildscripts/resmokeconfig/suites/multi_shard_multi_stmt_txn_jscore_passthrough.yml b/buildscripts/resmokeconfig/suites/multi_shard_multi_stmt_txn_jscore_passthrough.yml index ba86ce835cf..5f0ff54fddf 100644 --- a/buildscripts/resmokeconfig/suites/multi_shard_multi_stmt_txn_jscore_passthrough.yml +++ b/buildscripts/resmokeconfig/suites/multi_shard_multi_stmt_txn_jscore_passthrough.yml @@ -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. diff --git a/buildscripts/resmokeconfig/suites/multi_shard_multi_stmt_txn_kill_primary_jscore_passthrough.yml b/buildscripts/resmokeconfig/suites/multi_shard_multi_stmt_txn_kill_primary_jscore_passthrough.yml index d50954e2c29..613a93f9484 100644 --- a/buildscripts/resmokeconfig/suites/multi_shard_multi_stmt_txn_kill_primary_jscore_passthrough.yml +++ b/buildscripts/resmokeconfig/suites/multi_shard_multi_stmt_txn_kill_primary_jscore_passthrough.yml @@ -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. diff --git a/buildscripts/resmokeconfig/suites/multi_shard_multi_stmt_txn_stepdown_primary_jscore_passthrough.yml b/buildscripts/resmokeconfig/suites/multi_shard_multi_stmt_txn_stepdown_primary_jscore_passthrough.yml index d9af57125e2..d27bc84e658 100644 --- a/buildscripts/resmokeconfig/suites/multi_shard_multi_stmt_txn_stepdown_primary_jscore_passthrough.yml +++ b/buildscripts/resmokeconfig/suites/multi_shard_multi_stmt_txn_stepdown_primary_jscore_passthrough.yml @@ -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. diff --git a/buildscripts/resmokeconfig/suites/multi_stmt_txn_jscore_passthrough_with_migration.yml b/buildscripts/resmokeconfig/suites/multi_stmt_txn_jscore_passthrough_with_migration.yml index 728cb7d9a30..1efab704662 100644 --- a/buildscripts/resmokeconfig/suites/multi_stmt_txn_jscore_passthrough_with_migration.yml +++ b/buildscripts/resmokeconfig/suites/multi_stmt_txn_jscore_passthrough_with_migration.yml @@ -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. diff --git a/buildscripts/resmokeconfig/suites/query_stats_mongos_passthrough.yml b/buildscripts/resmokeconfig/suites/query_stats_mongos_passthrough.yml index cedb527b59c..be907a2761b 100644 --- a/buildscripts/resmokeconfig/suites/query_stats_mongos_passthrough.yml +++ b/buildscripts/resmokeconfig/suites/query_stats_mongos_passthrough.yml @@ -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. diff --git a/buildscripts/resmokeconfig/suites/replica_sets_auth.yml b/buildscripts/resmokeconfig/suites/replica_sets_auth.yml index d592b4ff8aa..f19c1e11688 100644 --- a/buildscripts/resmokeconfig/suites/replica_sets_auth.yml +++ b/buildscripts/resmokeconfig/suites/replica_sets_auth.yml @@ -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 diff --git a/buildscripts/resmokeconfig/suites/shard_merge_causally_consistent_jscore_passthrough.yml b/buildscripts/resmokeconfig/suites/shard_merge_causally_consistent_jscore_passthrough.yml index cbd73049d60..f9bc9b09681 100644 --- a/buildscripts/resmokeconfig/suites/shard_merge_causally_consistent_jscore_passthrough.yml +++ b/buildscripts/resmokeconfig/suites/shard_merge_causally_consistent_jscore_passthrough.yml @@ -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 diff --git a/buildscripts/resmokeconfig/suites/shard_merge_jscore_passthrough.yml b/buildscripts/resmokeconfig/suites/shard_merge_jscore_passthrough.yml index e49a80394f1..f8ebc38afc4 100644 --- a/buildscripts/resmokeconfig/suites/shard_merge_jscore_passthrough.yml +++ b/buildscripts/resmokeconfig/suites/shard_merge_jscore_passthrough.yml @@ -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 diff --git a/buildscripts/resmokeconfig/suites/shard_merge_multi_stmt_txn_jscore_passthrough.yml b/buildscripts/resmokeconfig/suites/shard_merge_multi_stmt_txn_jscore_passthrough.yml index a4819ea3d26..68875913845 100644 --- a/buildscripts/resmokeconfig/suites/shard_merge_multi_stmt_txn_jscore_passthrough.yml +++ b/buildscripts/resmokeconfig/suites/shard_merge_multi_stmt_txn_jscore_passthrough.yml @@ -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 diff --git a/buildscripts/resmokeconfig/suites/shard_split_causally_consistent_jscore_passthrough.yml b/buildscripts/resmokeconfig/suites/shard_split_causally_consistent_jscore_passthrough.yml index 687809099a0..e0827df8640 100644 --- a/buildscripts/resmokeconfig/suites/shard_split_causally_consistent_jscore_passthrough.yml +++ b/buildscripts/resmokeconfig/suites/shard_split_causally_consistent_jscore_passthrough.yml @@ -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 ## diff --git a/buildscripts/resmokeconfig/suites/shard_split_jscore_passthrough.yml b/buildscripts/resmokeconfig/suites/shard_split_jscore_passthrough.yml index 749a60bd14a..ad530b8d815 100644 --- a/buildscripts/resmokeconfig/suites/shard_split_jscore_passthrough.yml +++ b/buildscripts/resmokeconfig/suites/shard_split_jscore_passthrough.yml @@ -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. diff --git a/buildscripts/resmokeconfig/suites/shard_split_kill_primary_jscore_passthrough.yml b/buildscripts/resmokeconfig/suites/shard_split_kill_primary_jscore_passthrough.yml index 0378fee7bdf..4f24faaae9f 100644 --- a/buildscripts/resmokeconfig/suites/shard_split_kill_primary_jscore_passthrough.yml +++ b/buildscripts/resmokeconfig/suites/shard_split_kill_primary_jscore_passthrough.yml @@ -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 diff --git a/buildscripts/resmokeconfig/suites/shard_split_multi_stmt_txn_jscore_passthrough.yml b/buildscripts/resmokeconfig/suites/shard_split_multi_stmt_txn_jscore_passthrough.yml index 96c0f3a1f57..4d1b2e747da 100644 --- a/buildscripts/resmokeconfig/suites/shard_split_multi_stmt_txn_jscore_passthrough.yml +++ b/buildscripts/resmokeconfig/suites/shard_split_multi_stmt_txn_jscore_passthrough.yml @@ -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 diff --git a/buildscripts/resmokeconfig/suites/shard_split_stepdown_jscore_passthrough.yml b/buildscripts/resmokeconfig/suites/shard_split_stepdown_jscore_passthrough.yml index fe470c2cb84..72c0dc0a761 100644 --- a/buildscripts/resmokeconfig/suites/shard_split_stepdown_jscore_passthrough.yml +++ b/buildscripts/resmokeconfig/suites/shard_split_stepdown_jscore_passthrough.yml @@ -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 diff --git a/buildscripts/resmokeconfig/suites/shard_split_terminate_primary_jscore_passthrough.yml b/buildscripts/resmokeconfig/suites/shard_split_terminate_primary_jscore_passthrough.yml index 86c42b84f27..d24b4a21d99 100644 --- a/buildscripts/resmokeconfig/suites/shard_split_terminate_primary_jscore_passthrough.yml +++ b/buildscripts/resmokeconfig/suites/shard_split_terminate_primary_jscore_passthrough.yml @@ -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 diff --git a/buildscripts/resmokeconfig/suites/sharded_causally_consistent_jscore_passthrough.yml b/buildscripts/resmokeconfig/suites/sharded_causally_consistent_jscore_passthrough.yml index 43e5fabbd99..80823f44f5e 100644 --- a/buildscripts/resmokeconfig/suites/sharded_causally_consistent_jscore_passthrough.yml +++ b/buildscripts/resmokeconfig/suites/sharded_causally_consistent_jscore_passthrough.yml @@ -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. diff --git a/buildscripts/resmokeconfig/suites/sharded_causally_consistent_read_concern_snapshot_passthrough.yml b/buildscripts/resmokeconfig/suites/sharded_causally_consistent_read_concern_snapshot_passthrough.yml index 82bda49a099..b62d9fb5e07 100644 --- a/buildscripts/resmokeconfig/suites/sharded_causally_consistent_read_concern_snapshot_passthrough.yml +++ b/buildscripts/resmokeconfig/suites/sharded_causally_consistent_read_concern_snapshot_passthrough.yml @@ -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. diff --git a/buildscripts/resmokeconfig/suites/sharded_collections_jscore_passthrough.yml b/buildscripts/resmokeconfig/suites/sharded_collections_jscore_passthrough.yml index 4df28f3caf4..45dbcfa8c22 100644 --- a/buildscripts/resmokeconfig/suites/sharded_collections_jscore_passthrough.yml +++ b/buildscripts/resmokeconfig/suites/sharded_collections_jscore_passthrough.yml @@ -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. diff --git a/buildscripts/resmokeconfig/suites/sharded_collections_jscore_passthrough_with_auto_bootstrap.yml b/buildscripts/resmokeconfig/suites/sharded_collections_jscore_passthrough_with_auto_bootstrap.yml index b7874feef7f..fae4042db7a 100644 --- a/buildscripts/resmokeconfig/suites/sharded_collections_jscore_passthrough_with_auto_bootstrap.yml +++ b/buildscripts/resmokeconfig/suites/sharded_collections_jscore_passthrough_with_auto_bootstrap.yml @@ -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. diff --git a/buildscripts/resmokeconfig/suites/sharded_collections_jscore_passthrough_with_config_transitions.yml b/buildscripts/resmokeconfig/suites/sharded_collections_jscore_passthrough_with_config_transitions.yml index 06c3f7f9bfc..819c29180a3 100644 --- a/buildscripts/resmokeconfig/suites/sharded_collections_jscore_passthrough_with_config_transitions.yml +++ b/buildscripts/resmokeconfig/suites/sharded_collections_jscore_passthrough_with_config_transitions.yml @@ -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. diff --git a/buildscripts/resmokeconfig/suites/sharded_collections_jscore_passthrough_with_replica_set_endpoint.yml b/buildscripts/resmokeconfig/suites/sharded_collections_jscore_passthrough_with_replica_set_endpoint.yml index 37fa9b86a0d..83525b194e9 100644 --- a/buildscripts/resmokeconfig/suites/sharded_collections_jscore_passthrough_with_replica_set_endpoint.yml +++ b/buildscripts/resmokeconfig/suites/sharded_collections_jscore_passthrough_with_replica_set_endpoint.yml @@ -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. diff --git a/buildscripts/resmokeconfig/suites/sharded_collections_uninitialized_fcv_jscore_passthrough.yml b/buildscripts/resmokeconfig/suites/sharded_collections_uninitialized_fcv_jscore_passthrough.yml index 05aa839663b..7072f3931f3 100644 --- a/buildscripts/resmokeconfig/suites/sharded_collections_uninitialized_fcv_jscore_passthrough.yml +++ b/buildscripts/resmokeconfig/suites/sharded_collections_uninitialized_fcv_jscore_passthrough.yml @@ -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. diff --git a/buildscripts/resmokeconfig/suites/sharded_multi_stmt_txn_jscore_passthrough.yml b/buildscripts/resmokeconfig/suites/sharded_multi_stmt_txn_jscore_passthrough.yml index 8c07a8a3004..944f504624f 100644 --- a/buildscripts/resmokeconfig/suites/sharded_multi_stmt_txn_jscore_passthrough.yml +++ b/buildscripts/resmokeconfig/suites/sharded_multi_stmt_txn_jscore_passthrough.yml @@ -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. diff --git a/buildscripts/resmokeconfig/suites/sharding_api_version_jscore_passthrough.yml b/buildscripts/resmokeconfig/suites/sharding_api_version_jscore_passthrough.yml index b77af82128a..d065fa93c8a 100644 --- a/buildscripts/resmokeconfig/suites/sharding_api_version_jscore_passthrough.yml +++ b/buildscripts/resmokeconfig/suites/sharding_api_version_jscore_passthrough.yml @@ -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. diff --git a/buildscripts/resmokeconfig/suites/sharding_jscore_passthrough.yml b/buildscripts/resmokeconfig/suites/sharding_jscore_passthrough.yml index d8a11af1a59..f5569504c2d 100644 --- a/buildscripts/resmokeconfig/suites/sharding_jscore_passthrough.yml +++ b/buildscripts/resmokeconfig/suites/sharding_jscore_passthrough.yml @@ -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. diff --git a/buildscripts/resmokeconfig/suites/sharding_jscore_passthrough_with_auto_bootstrap.yml b/buildscripts/resmokeconfig/suites/sharding_jscore_passthrough_with_auto_bootstrap.yml index 50e1ce33f77..48711a68268 100644 --- a/buildscripts/resmokeconfig/suites/sharding_jscore_passthrough_with_auto_bootstrap.yml +++ b/buildscripts/resmokeconfig/suites/sharding_jscore_passthrough_with_auto_bootstrap.yml @@ -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. diff --git a/buildscripts/resmokeconfig/suites/sharding_jscore_passthrough_with_balancer.yml b/buildscripts/resmokeconfig/suites/sharding_jscore_passthrough_with_balancer.yml index 5236092b32d..227dc7bd20f 100644 --- a/buildscripts/resmokeconfig/suites/sharding_jscore_passthrough_with_balancer.yml +++ b/buildscripts/resmokeconfig/suites/sharding_jscore_passthrough_with_balancer.yml @@ -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. diff --git a/buildscripts/resmokeconfig/suites/sharding_jscore_passthrough_with_config_transitions.yml b/buildscripts/resmokeconfig/suites/sharding_jscore_passthrough_with_config_transitions.yml index c0d6abcc863..7cf75c191c2 100644 --- a/buildscripts/resmokeconfig/suites/sharding_jscore_passthrough_with_config_transitions.yml +++ b/buildscripts/resmokeconfig/suites/sharding_jscore_passthrough_with_config_transitions.yml @@ -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. diff --git a/buildscripts/resmokeconfig/suites/sharding_jscore_passthrough_with_replica_set_endpoint.yml b/buildscripts/resmokeconfig/suites/sharding_jscore_passthrough_with_replica_set_endpoint.yml index 1cd1322067c..6f777731b33 100644 --- a/buildscripts/resmokeconfig/suites/sharding_jscore_passthrough_with_replica_set_endpoint.yml +++ b/buildscripts/resmokeconfig/suites/sharding_jscore_passthrough_with_replica_set_endpoint.yml @@ -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. diff --git a/buildscripts/resmokeconfig/suites/sharding_uninitialized_fcv_jscore_passthrough.yml b/buildscripts/resmokeconfig/suites/sharding_uninitialized_fcv_jscore_passthrough.yml index e7b48b20bbc..9c9422f7d97 100644 --- a/buildscripts/resmokeconfig/suites/sharding_uninitialized_fcv_jscore_passthrough.yml +++ b/buildscripts/resmokeconfig/suites/sharding_uninitialized_fcv_jscore_passthrough.yml @@ -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. diff --git a/buildscripts/resmokeconfig/suites/tenant_migration_causally_consistent_jscore_passthrough.yml b/buildscripts/resmokeconfig/suites/tenant_migration_causally_consistent_jscore_passthrough.yml index 55639c9d392..48bce053004 100644 --- a/buildscripts/resmokeconfig/suites/tenant_migration_causally_consistent_jscore_passthrough.yml +++ b/buildscripts/resmokeconfig/suites/tenant_migration_causally_consistent_jscore_passthrough.yml @@ -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 ## diff --git a/buildscripts/resmokeconfig/suites/tenant_migration_jscore_passthrough.yml b/buildscripts/resmokeconfig/suites/tenant_migration_jscore_passthrough.yml index 6c19e986320..188254de880 100644 --- a/buildscripts/resmokeconfig/suites/tenant_migration_jscore_passthrough.yml +++ b/buildscripts/resmokeconfig/suites/tenant_migration_jscore_passthrough.yml @@ -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 diff --git a/buildscripts/resmokeconfig/suites/tenant_migration_kill_primary_jscore_passthrough.yml b/buildscripts/resmokeconfig/suites/tenant_migration_kill_primary_jscore_passthrough.yml index 28d4ff7d4d4..afb12feaaf0 100644 --- a/buildscripts/resmokeconfig/suites/tenant_migration_kill_primary_jscore_passthrough.yml +++ b/buildscripts/resmokeconfig/suites/tenant_migration_kill_primary_jscore_passthrough.yml @@ -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 diff --git a/buildscripts/resmokeconfig/suites/tenant_migration_multi_stmt_txn_jscore_passthrough.yml b/buildscripts/resmokeconfig/suites/tenant_migration_multi_stmt_txn_jscore_passthrough.yml index 1d6064813db..5ca7a1a6116 100644 --- a/buildscripts/resmokeconfig/suites/tenant_migration_multi_stmt_txn_jscore_passthrough.yml +++ b/buildscripts/resmokeconfig/suites/tenant_migration_multi_stmt_txn_jscore_passthrough.yml @@ -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 diff --git a/buildscripts/resmokeconfig/suites/tenant_migration_stepdown_jscore_passthrough.yml b/buildscripts/resmokeconfig/suites/tenant_migration_stepdown_jscore_passthrough.yml index c5c251b040c..36b8e73e958 100644 --- a/buildscripts/resmokeconfig/suites/tenant_migration_stepdown_jscore_passthrough.yml +++ b/buildscripts/resmokeconfig/suites/tenant_migration_stepdown_jscore_passthrough.yml @@ -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 diff --git a/buildscripts/resmokeconfig/suites/tenant_migration_terminate_primary_jscore_passthrough.yml b/buildscripts/resmokeconfig/suites/tenant_migration_terminate_primary_jscore_passthrough.yml index 80f2fd46a9c..49d4501f669 100644 --- a/buildscripts/resmokeconfig/suites/tenant_migration_terminate_primary_jscore_passthrough.yml +++ b/buildscripts/resmokeconfig/suites/tenant_migration_terminate_primary_jscore_passthrough.yml @@ -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 diff --git a/buildscripts/resmokeconfig/suites/timeseries_crud_jscore_passthrough.yml b/buildscripts/resmokeconfig/suites/timeseries_crud_jscore_passthrough.yml index ebebbde5099..43d41309213 100644 --- a/buildscripts/resmokeconfig/suites/timeseries_crud_jscore_passthrough.yml +++ b/buildscripts/resmokeconfig/suites/timeseries_crud_jscore_passthrough.yml @@ -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 diff --git a/buildscripts/resmokeconfig/suites/unsplittable_collections_created_on_any_shard_jscore_passthrough.yml b/buildscripts/resmokeconfig/suites/unsplittable_collections_created_on_any_shard_jscore_passthrough.yml index ee14b3d72a8..6b24bb5ac35 100644 --- a/buildscripts/resmokeconfig/suites/unsplittable_collections_created_on_any_shard_jscore_passthrough.yml +++ b/buildscripts/resmokeconfig/suites/unsplittable_collections_created_on_any_shard_jscore_passthrough.yml @@ -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. diff --git a/buildscripts/resmokelib/configure_resmoke.py b/buildscripts/resmokelib/configure_resmoke.py index eebec8f227c..9e61a152b21 100644 --- a/buildscripts/resmokelib/configure_resmoke.py +++ b/buildscripts/resmokelib/configure_resmoke.py @@ -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") diff --git a/docs/test_commands.md b/docs/test_commands.md index b097def6514..72720cc6e5f 100644 --- a/docs/test_commands.md +++ b/docs/test_commands.md @@ -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] diff --git a/jstests/auth/lib/commands_lib.js b/jstests/auth/lib/commands_lib.js index 9ab43d63b17..d5c58eb56ce 100644 --- a/jstests/auth/lib/commands_lib.js +++ b/jstests/auth/lib/commands_lib.js @@ -5280,7 +5280,7 @@ export const authCommandsLib = { } }, teardown: function(db) { - assert.commandWorked(db.oplog.rs.runCommand('emptycapped')); + assert.commandWorked(db.oplog.rs.deleteMany({})); }, testcases: [ { diff --git a/jstests/auth/test_only_commands_list.js b/jstests/auth/test_only_commands_list.js index ad45033067c..f70ee459cf1 100644 --- a/jstests/auth/test_only_commands_list.js +++ b/jstests/auth/test_only_commands_list.js @@ -7,7 +7,6 @@ export const testOnlyCommands = [ 'sleep', 'cpuload', 'captrunc', - 'emptycapped', 'sysprofile', '_dropConnectionsToMongot', '_mongotConnPoolStats' diff --git a/jstests/core/capped/capped_empty.js b/jstests/core/capped/capped_empty.js deleted file mode 100644 index cd387d0aa69..00000000000 --- a/jstests/core/capped/capped_empty.js +++ /dev/null @@ -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()); diff --git a/jstests/core/views/views_all_commands.js b/jstests/core/views/views_all_commands.js index 32dc6048779..98fc5bf57ae 100644 --- a/jstests/core/views/views_all_commands.js +++ b/jstests/core/views/views_all_commands.js @@ -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"}}}, diff --git a/jstests/core/write/collection_truncate.js b/jstests/core/write/collection_truncate.js deleted file mode 100644 index c8dc1e8f58c..00000000000 --- a/jstests/core/write/collection_truncate.js +++ /dev/null @@ -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(); diff --git a/jstests/libs/override_methods/config_fuzzer_incompatible_commands.js b/jstests/libs/override_methods/config_fuzzer_incompatible_commands.js index 6f7eb112f48..dbe01f64d85 100644 --- a/jstests/libs/override_methods/config_fuzzer_incompatible_commands.js +++ b/jstests/libs/override_methods/config_fuzzer_incompatible_commands.js @@ -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; } diff --git a/jstests/libs/override_methods/network_error_and_txn_override.js b/jstests/libs/override_methods/network_error_and_txn_override.js index 595d13b2c51..61ba25c5f87 100644 --- a/jstests/libs/override_methods/network_error_and_txn_override.js +++ b/jstests/libs/override_methods/network_error_and_txn_override.js @@ -99,7 +99,6 @@ const kNonRetryableCommands = new Set([ "dropIndexes", "dropRole", "dropUser", - "emptycapped", "godinsert", "internalRenameIfOptionsAndIndexesMatch", "updateRole", diff --git a/jstests/libs/override_methods/read_and_write_concern_helpers.js b/jstests/libs/override_methods/read_and_write_concern_helpers.js index 66891022b1b..bd1948490db 100644 --- a/jstests/libs/override_methods/read_and_write_concern_helpers.js +++ b/jstests/libs/override_methods/read_and_write_concern_helpers.js @@ -68,7 +68,6 @@ export var kCommandsSupportingWriteConcern = new Set([ "dropIndexes", "dropRole", "dropUser", - "emptycapped", "findAndModify", "findandmodify", "godinsert", diff --git a/jstests/replsets/all_commands_downgrading_to_upgraded.js b/jstests/replsets/all_commands_downgrading_to_upgraded.js index 376382faa8a..c2353322d4e 100644 --- a/jstests/replsets/all_commands_downgrading_to_upgraded.js +++ b/jstests/replsets/all_commands_downgrading_to_upgraded.js @@ -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, diff --git a/jstests/replsets/db_reads_while_recovering_all_commands.js b/jstests/replsets/db_reads_while_recovering_all_commands.js index ed84f3e336a..bded9df67d9 100644 --- a/jstests/replsets/db_reads_while_recovering_all_commands.js +++ b/jstests/replsets/db_reads_while_recovering_all_commands.js @@ -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}, diff --git a/jstests/replsets/emptycapped.js b/jstests/replsets/emptycapped.js deleted file mode 100644 index 6098a1e74ba..00000000000 --- a/jstests/replsets/emptycapped.js +++ /dev/null @@ -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(); \ No newline at end of file diff --git a/jstests/replsets/system_profile.js b/jstests/replsets/system_profile.js index 101f6718e1c..7d32c62eab3 100644 --- a/jstests/replsets/system_profile.js +++ b/jstests/replsets/system_profile.js @@ -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(); \ No newline at end of file diff --git a/jstests/replsets/tenant_migration_concurrent_writes_on_donor_util.js b/jstests/replsets/tenant_migration_concurrent_writes_on_donor_util.js index 4d4499d8479..512a934740c 100644 --- a/jstests/replsets/tenant_migration_concurrent_writes_on_donor_util.js +++ b/jstests/replsets/tenant_migration_concurrent_writes_on_donor_util.js @@ -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}, diff --git a/jstests/sharding/all_commands_direct_shard_connection_auth.js b/jstests/sharding/all_commands_direct_shard_connection_auth.js index 0a4454c5215..d8bc689d192 100644 --- a/jstests/sharding/all_commands_direct_shard_connection_auth.js +++ b/jstests/sharding/all_commands_direct_shard_connection_auth.js @@ -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, }, diff --git a/jstests/sharding/read_write_concern_defaults_application.js b/jstests/sharding/read_write_concern_defaults_application.js index 378309ed588..35fe89019d0 100644 --- a/jstests/sharding/read_write_concern_defaults_application.js +++ b/jstests/sharding/read_write_concern_defaults_application.js @@ -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; } diff --git a/jstests/sharding/safe_secondary_reads_drop_recreate.js b/jstests/sharding/safe_secondary_reads_drop_recreate.js index b1fd75b75b9..4d39377ca70 100644 --- a/jstests/sharding/safe_secondary_reads_drop_recreate.js +++ b/jstests/sharding/safe_secondary_reads_drop_recreate.js @@ -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"}, diff --git a/jstests/sharding/safe_secondary_reads_single_migration_suspend_range_deletion.js b/jstests/sharding/safe_secondary_reads_single_migration_suspend_range_deletion.js index 58fbf75657e..94ec72b2d3b 100644 --- a/jstests/sharding/safe_secondary_reads_single_migration_suspend_range_deletion.js +++ b/jstests/sharding/safe_secondary_reads_single_migration_suspend_range_deletion.js @@ -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"}, diff --git a/jstests/sharding/safe_secondary_reads_single_migration_waitForDelete.js b/jstests/sharding/safe_secondary_reads_single_migration_waitForDelete.js index 2e2568499b3..7f096ac5d70 100644 --- a/jstests/sharding/safe_secondary_reads_single_migration_waitForDelete.js +++ b/jstests/sharding/safe_secondary_reads_single_migration_waitForDelete.js @@ -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"}, diff --git a/src/mongo/db/auth/action_type.idl b/src/mongo/db/auth/action_type.idl index 5bb836f7e56..75105fe3099 100644 --- a/src/mongo/db/auth/action_type.idl +++ b/src/mongo/db/auth/action_type.idl @@ -97,7 +97,7 @@ enums: dropRole : "dropRole" dropSearchIndex : "dropSearchIndex" dropUser : "dropUser" - emptycapped : "emptycapped" + emptycapped : "emptycapped" # Deprecated (backwards compatibility) enableProfiler : "enableProfiler" enableSharding : "enableSharding" exportCollection : "exportCollection" diff --git a/src/mongo/db/auth/auth_op_observer.cpp b/src/mongo/db/auth/auth_op_observer.cpp index b62998d6793..e024b8346e3 100644 --- a/src/mongo/db/auth/auth_op_observer.cpp +++ b/src/mongo/db/auth/auth_op_observer.cpp @@ -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. diff --git a/src/mongo/db/auth/auth_op_observer.h b/src/mongo/db/auth/auth_op_observer.h index 2a6bca3cf6f..99e4910158c 100644 --- a/src/mongo/db/auth/auth_op_observer.h +++ b/src/mongo/db/auth/auth_op_observer.h @@ -151,11 +151,6 @@ public: const boost::optional& dropTargetUUID, bool stayTemp) final; - - void onEmptyCapped(OperationContext* opCtx, - const NamespaceString& collectionName, - const UUID& uuid) final; - void onReplicationRollback(OperationContext* opCtx, const RollbackObserverInfo& rbInfo) final; }; diff --git a/src/mongo/db/catalog/capped_utils.cpp b/src/mongo/db/catalog/capped_utils.cpp index 2eb316ddc8a..ff70a73eb32 100644 --- a/src/mongo/db/catalog/capped_utils.cpp +++ b/src/mongo/db/catalog/capped_utils.cpp @@ -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, diff --git a/src/mongo/db/catalog/capped_utils.h b/src/mongo/db/catalog/capped_utils.h index 14ac7da0deb..0150b714673 100644 --- a/src/mongo/db/catalog/capped_utils.h +++ b/src/mongo/db/catalog/capped_utils.h @@ -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 diff --git a/src/mongo/db/commands/test_commands.cpp b/src/mongo/db/commands/test_commands.cpp index 9ce460ccd19..447b753e949 100644 --- a/src/mongo/db/commands/test_commands.cpp +++ b/src/mongo/db/commands/test_commands.cpp @@ -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") {} diff --git a/src/mongo/db/op_observer/op_observer.h b/src/mongo/db/op_observer/op_observer.h index d59a4e3bf92..ba361e6545c 100644 --- a/src/mongo/db/op_observer/op_observer.h +++ b/src/mongo/db/op_observer/op_observer.h @@ -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. diff --git a/src/mongo/db/op_observer/op_observer_impl.cpp b/src/mongo/db/op_observer/op_observer_impl.cpp index da02bf82c92..c6eb9fab956 100644 --- a/src/mongo/db/op_observer/op_observer_impl.cpp +++ b/src/mongo/db/op_observer/op_observer_impl.cpp @@ -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 { diff --git a/src/mongo/db/op_observer/op_observer_impl.h b/src/mongo/db/op_observer/op_observer_impl.h index ae6d4250d89..db92d96c689 100644 --- a/src/mongo/db/op_observer/op_observer_impl.h +++ b/src/mongo/db/op_observer/op_observer_impl.h @@ -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, diff --git a/src/mongo/db/op_observer/op_observer_noop.h b/src/mongo/db/op_observer/op_observer_noop.h index 2fbb45e80d0..7ba596af1aa 100644 --- a/src/mongo/db/op_observer/op_observer_noop.h +++ b/src/mongo/db/op_observer/op_observer_noop.h @@ -211,11 +211,6 @@ public: const boost::optional& dropTargetUUID, bool stayTemp) override {} - - void onEmptyCapped(OperationContext* opCtx, - const NamespaceString& collectionName, - const UUID& uuid) override {} - void onTransactionStart(OperationContext* opCtx) override {} void onUnpreparedTransactionCommit( diff --git a/src/mongo/db/op_observer/op_observer_registry.h b/src/mongo/db/op_observer/op_observer_registry.h index 49e489f883c..ad9716a2912 100644 --- a/src/mongo/db/op_observer/op_observer_registry.h +++ b/src/mongo/db/op_observer/op_observer_registry.h @@ -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) { diff --git a/src/mongo/db/repl/oplog.cpp b/src/mongo/db/repl/oplog.cpp index 419be9aea3d..00a1391a0f3 100644 --- a/src/mongo/db/repl/oplog.cpp +++ b/src/mongo/db/repl/oplog.cpp @@ -187,7 +187,6 @@ void abortIndexBuilds(OperationContext* opCtx, commandType == OplogEntry::CommandType::kDropIndexes || commandType == OplogEntry::CommandType::kDeleteIndexes || commandType == OplogEntry::CommandType::kCollMod || - commandType == OplogEntry::CommandType::kEmptyCapped || commandType == OplogEntry::CommandType::kRenameCollection) { const boost::optional collUUID = CollectionCatalog::get(opCtx)->lookupUUIDByNSS(opCtx, nss); @@ -1155,15 +1154,6 @@ const StringMap kOpsMap = { return Status::OK(); }, {ErrorCodes::NamespaceNotFound}}}, - {"emptycapped", - {[](OperationContext* opCtx, const ApplierOperation& op, OplogApplication::Mode mode) - -> Status { - const auto& entry = *op; - return emptyCapped( - opCtx, - extractNsFromUUIDorNs(opCtx, entry.getNss(), entry.getUuid(), entry.getObject())); - }, - {ErrorCodes::NamespaceNotFound}}}, {"commitTransaction", {[](OperationContext* opCtx, const ApplierOperation& op, OplogApplication::Mode mode) -> Status { diff --git a/src/mongo/db/repl/oplog_applier_impl_test.cpp b/src/mongo/db/repl/oplog_applier_impl_test.cpp index ebdc2ca33e6..08b35e66f37 100644 --- a/src/mongo/db/repl/oplog_applier_impl_test.cpp +++ b/src/mongo/db/repl/oplog_applier_impl_test.cpp @@ -5163,20 +5163,6 @@ TEST_F(OplogApplierImplTxnTableTest, NonMigrateNoOpEntriesShouldNotUpdateTxnTabl BSON(SessionTxnRecord::kSessionIdFieldName << sessionInfo.getSessionId()->toBSON()))); } -TEST_F(IdempotencyTest, EmptyCappedNamespaceNotFound) { - // Create a BSON "emptycapped" command. - auto emptyCappedCmd = BSON("emptycapped" << _nss.coll()); - - // Create an "emptycapped" oplog entry. - auto emptyCappedOp = makeCommandOplogEntry(nextOpTime(), _nss, emptyCappedCmd); - - // Ensure that NamespaceNotFound is acceptable. - ASSERT_OK(runOpInitialSync(emptyCappedOp)); - - AutoGetCollectionForReadCommand autoColl(_opCtx.get(), _nss); - ASSERT_FALSE(autoColl); -} - TEST_F(IdempotencyTest, UpdateTwoFields) { ASSERT_OK( ReplicationCoordinator::get(_opCtx.get())->setFollowerMode(MemberState::RS_RECOVERING)); @@ -5204,15 +5190,15 @@ typedef SetSteadyStateConstraints IdempotencyTestEnableSteadyStateConstraints; TEST_F(IdempotencyTestDisableSteadyStateConstraints, AcceptableErrorsRecordedInSteadyStateMode) { - // Create a BSON "emptycapped" command. - auto emptyCappedCmd = BSON("emptycapped" << _nss.coll()); + // Create a BSON "collMod" command. + auto collModCmd = BSON("collMod" << _nss.coll()); - // Create a "emptycapped" oplog entry. - auto emptyCappedOp = makeCommandOplogEntry(nextOpTime(), _nss, emptyCappedCmd); + // Create a "collMod" oplog entry. + auto collModOp = makeCommandOplogEntry(nextOpTime(), _nss, collModCmd, UUID::gen()); // Ensure that NamespaceNotFound is "acceptable" but counted. int prevAcceptableError = replOpCounters.getAcceptableErrorInCommand()->load(); - ASSERT_OK(runOpSteadyState(emptyCappedOp)); + ASSERT_OK(runOpSteadyState(collModOp)); auto postAcceptableError = replOpCounters.getAcceptableErrorInCommand()->load(); ASSERT_EQ(1, postAcceptableError - prevAcceptableError); @@ -5226,14 +5212,14 @@ TEST_F(IdempotencyTestDisableSteadyStateConstraints, AcceptableErrorsRecordedInS TEST_F(IdempotencyTestEnableSteadyStateConstraints, AcceptableErrorsNotAcceptableInSteadyStateMode) { - // Create a BSON "emptycapped" command. - auto emptyCappedCmd = BSON("emptycapped" << _nss.coll()); + // Create a BSON "collMod" command. + auto collModCmd = BSON("collMod" << _nss.coll()); - // Create a "emptyCapped" oplog entry. - auto emptyCappedOp = makeCommandOplogEntry(nextOpTime(), _nss, emptyCappedCmd); + // Create a "collMod" oplog entry. + auto collModOp = makeCommandOplogEntry(nextOpTime(), _nss, collModCmd, UUID::gen()); // Ensure that NamespaceNotFound is returned. - ASSERT_EQUALS(ErrorCodes::NamespaceNotFound, runOpSteadyState(emptyCappedOp)); + ASSERT_EQUALS(ErrorCodes::NamespaceNotFound, runOpSteadyState(collModOp)); } class IdempotencyTestTxns : public IdempotencyTest {}; diff --git a/src/mongo/db/repl/oplog_entry.idl b/src/mongo/db/repl/oplog_entry.idl index b853dcd5480..462b1896564 100644 --- a/src/mongo/db/repl/oplog_entry.idl +++ b/src/mongo/db/repl/oplog_entry.idl @@ -87,7 +87,6 @@ enums: kCollMod: "collMod" kApplyOps: "applyOps" kDropDatabase: "dropDatabase" - kEmptyCapped: "emptycapped" kCreateIndexes: "createIndexes" kStartIndexBuild: "startIndexBuild" kCommitIndexBuild: "commitIndexBuild" diff --git a/src/mongo/db/repl/rollback_impl.cpp b/src/mongo/db/repl/rollback_impl.cpp index 102a45ab200..0400ca75bdd 100644 --- a/src/mongo/db/repl/rollback_impl.cpp +++ b/src/mongo/db/repl/rollback_impl.cpp @@ -499,15 +499,6 @@ RollbackImpl::_namespacesAndUUIDsForOp(const OplogEntry& oplogEntry) { break; } case OplogEntry::CommandType::kDbCheck: - case OplogEntry::CommandType::kEmptyCapped: { - // These commands do not need to be supported by rollback. 'convertToCapped' should - // always be converted to lower level DDL operations, and 'emptycapped' is a - // test-only command. - std::string message = str::stream() - << "Encountered unsupported command type '" << firstElem.fieldName() - << "' during rollback."; - return Status(ErrorCodes::UnrecoverableRollbackError, message); - } case OplogEntry::CommandType::kModifyCollectionShardingIndexCatalog: case OplogEntry::CommandType::kCreateGlobalIndex: case OplogEntry::CommandType::kDropGlobalIndex: diff --git a/src/mongo/db/repl/rollback_impl_test.cpp b/src/mongo/db/repl/rollback_impl_test.cpp index 1c8026633f4..4da54ccbb42 100644 --- a/src/mongo/db/repl/rollback_impl_test.cpp +++ b/src/mongo/db/repl/rollback_impl_test.cpp @@ -2355,20 +2355,6 @@ TEST_F(RollbackImplObserverInfoTest, ASSERT(expectedUUIDs == uuids); } -TEST_F(RollbackImplObserverInfoTest, NamespacesForOpsFailsOnUnsupportedOplogEntry) { - // 'emptycapped' is not supported in rollback. - auto emptycappedOp = - makeCommandOp(Timestamp(2, 2), - boost::none, - NamespaceString::createNamespaceString_forTest("test", "$cmd"), - BSON("emptycapped" << 1), - 2); - - auto status = - _rollback->_namespacesAndUUIDsForOp_forTest(OplogEntry(emptycappedOp.first)).getStatus(); - ASSERT_EQUALS(ErrorCodes::UnrecoverableRollbackError, status); -} - DEATH_TEST_F(RollbackImplObserverInfoTest, NamespacesForOpsInvariantsOnApplyOpsOplogEntry, "_namespacesAndUUIDsForOp does not handle 'applyOps' oplog entries.") { diff --git a/src/mongo/dbtests/querytests.cpp b/src/mongo/dbtests/querytests.cpp index dd30110a107..4171af47f69 100644 --- a/src/mongo/dbtests/querytests.cpp +++ b/src/mongo/dbtests/querytests.cpp @@ -79,6 +79,8 @@ #include "mongo/db/index/index_descriptor.h" #include "mongo/db/namespace_string.h" #include "mongo/db/operation_context.h" +#include "mongo/db/ops/write_ops.h" +#include "mongo/db/ops/write_ops_gen.h" #include "mongo/db/query/find_command.h" #include "mongo/db/query/query_settings/query_settings_manager.h" #include "mongo/db/repl/oplog.h" @@ -118,6 +120,15 @@ void insertOplogDocument(OperationContext* opCtx, Timestamp ts, StringData ns) { wuow.commit(); } +void deleteAll(OperationContext& opCtx, const NamespaceString& ns) { + // Delete one-at-a-time because deleting all at once may used a batched delete which will fail + // upon encountering a document that does not contain an _id. + DBDirectClient client{&opCtx}; + while (client.count(ns)) { + write_ops::checkWriteErrors(client.remove({ns, {{{}, false}}})); + } +} + using std::endl; using std::string; using std::unique_ptr; @@ -777,11 +788,7 @@ public: // To ensure we are working with a clean oplog (an oplog without entries), we resort // to truncating the oplog instead. if (_opCtx.getServiceContext()->getStorageEngine()->supportsRecoveryTimestamp()) { - BSONObj info; - _client.runCommand(_nss.dbName(), - BSON("emptycapped" - << "oplog.querytests.OplogScanWithGtTimstampPred"), - info); + deleteAll(_opCtx, _nss); } const auto ns = _nss.ns_forTest(); insertOplogDocument(&_opCtx, Timestamp(1000, 0), ns); @@ -829,11 +836,7 @@ public: // To ensure we are working with a clean oplog (an oplog without entries), we resort // to truncating the oplog instead. if (_opCtx.getServiceContext()->getStorageEngine()->supportsRecoveryTimestamp()) { - BSONObj info; - _client.runCommand(_nss.dbName(), - BSON("emptycapped" - << "oplog.querytests.OplogScanGtTsExplain"), - info); + deleteAll(_opCtx, _nss); } const auto ns = _nss.ns_forTest(); @@ -1624,10 +1627,7 @@ public: // To ensure we are working with a clean oplog (an oplog without entries), we resort // to truncating the oplog instead. if (_opCtx.getServiceContext()->getStorageEngine()->supportsRecoveryTimestamp()) { - _client.runCommand(DatabaseName::kLocal, - BSON("emptycapped" - << "oplog.querytests.findingstart"), - info); + deleteAll(_opCtx, NamespaceString::createNamespaceString_forTest(ns())); } unsigned i = 0; @@ -1694,10 +1694,7 @@ public: // To ensure we are working with a clean oplog (an oplog without entries), we resort // to truncating the oplog instead. if (_opCtx.getServiceContext()->getStorageEngine()->supportsRecoveryTimestamp()) { - _client.runCommand(DatabaseName::kLocal, - BSON("emptycapped" - << "oplog.querytests.findingstart"), - info); + deleteAll(_opCtx, NamespaceString::createNamespaceString_forTest(ns())); } unsigned i = 0; @@ -1765,10 +1762,7 @@ public: // To ensure we are working with a clean oplog (an oplog without entries), we resort // to truncating the oplog instead. if (_opCtx.getServiceContext()->getStorageEngine()->supportsRecoveryTimestamp()) { - _client.runCommand(DatabaseName::kLocal, - BSON("emptycapped" - << "oplog.querytests.findingstart"), - info); + deleteAll(_opCtx, NamespaceString::createNamespaceString_forTest(ns())); } // Check oplog replay mode with empty collection.