diff options
author | Samy Lanka <samy.lanka@gmail.com> | 2018-04-06 10:33:03 -0400 |
---|---|---|
committer | Samy Lanka <samy.lanka@gmail.com> | 2018-04-06 10:33:03 -0400 |
commit | ea5b5a97ed247e26d9de87089fe8dd81cda14a9e (patch) | |
tree | a9d2d326298c2c4236d957792fd9031fb134253c | |
parent | b180ec4ad34b40b499cb4c7a2f01508ed639b44b (diff) | |
download | mongo-ea5b5a97ed247e26d9de87089fe8dd81cda14a9e.tar.gz |
SERVER-33287 tag jstests that use commands which return inaccurate results after unclean shutdown
150 files changed, 243 insertions, 102 deletions
diff --git a/jstests/core/apitest_dbcollection.js b/jstests/core/apitest_dbcollection.js index 775abc97272..a7c8655edde 100644 --- a/jstests/core/apitest_dbcollection.js +++ b/jstests/core/apitest_dbcollection.js @@ -1,5 +1,7 @@ /** - * Tests for the db collection + * Tests for the db collection + * + * @tags: [requires_fastcount] */ /* diff --git a/jstests/core/apply_ops1.js b/jstests/core/apply_ops1.js index 31c746ff03b..ba6a853782c 100644 --- a/jstests/core/apply_ops1.js +++ b/jstests/core/apply_ops1.js @@ -1,4 +1,4 @@ -// @tags: [requires_non_retryable_commands] +// @tags: [requires_non_retryable_commands, requires_fastcount] (function() { "use strict"; diff --git a/jstests/core/apply_ops2.js b/jstests/core/apply_ops2.js index b46f119d4f7..a7f752d1456 100644 --- a/jstests/core/apply_ops2.js +++ b/jstests/core/apply_ops2.js @@ -1,4 +1,4 @@ -// @tags: [requires_non_retryable_commands] +// @tags: [requires_non_retryable_commands, requires_fastcount] // Test applyops upsert flag SERVER-7452 diff --git a/jstests/core/apply_ops_dups.js b/jstests/core/apply_ops_dups.js index 01e25cbe802..292c9ecb648 100644 --- a/jstests/core/apply_ops_dups.js +++ b/jstests/core/apply_ops_dups.js @@ -1,4 +1,4 @@ -// @tags: [requires_non_retryable_commands] +// @tags: [requires_non_retryable_commands, requires_fastcount] (function() { "use strict"; diff --git a/jstests/core/arrayfind1.js b/jstests/core/arrayfind1.js index bd8d47b845e..e773eea24d6 100644 --- a/jstests/core/arrayfind1.js +++ b/jstests/core/arrayfind1.js @@ -1,3 +1,4 @@ +// @tags: [requires_fastcount] t = db.arrayfind1; t.drop(); diff --git a/jstests/core/arrayfind2.js b/jstests/core/arrayfind2.js index 60eaa27f0d7..bbceffaa126 100644 --- a/jstests/core/arrayfind2.js +++ b/jstests/core/arrayfind2.js @@ -1,3 +1,4 @@ +// @tags: [requires_fastcount] t = db.arrayfind2; t.drop(); diff --git a/jstests/core/auth_copydb.js b/jstests/core/auth_copydb.js index 176061b423e..17842256d80 100644 --- a/jstests/core/auth_copydb.js +++ b/jstests/core/auth_copydb.js @@ -1,4 +1,4 @@ -// @tags: [requires_non_retryable_commands] +// @tags: [requires_non_retryable_commands, requires_fastcount] a = db.getSisterDB("copydb2-test-a"); b = db.getSisterDB("copydb2-test-b"); diff --git a/jstests/core/basic2.js b/jstests/core/basic2.js index 7c68a3e4f3a..4d854d4b1ea 100644 --- a/jstests/core/basic2.js +++ b/jstests/core/basic2.js @@ -1,4 +1,4 @@ -// @tags: [requires_non_retryable_writes] +// @tags: [requires_non_retryable_writes, requires_fastcount] t = db.getCollection("basic2"); t.drop(); diff --git a/jstests/core/basic8.js b/jstests/core/basic8.js index d9b158487cc..4a35de6963b 100644 --- a/jstests/core/basic8.js +++ b/jstests/core/basic8.js @@ -1,3 +1,4 @@ +// @tags: [requires_fastcount] t = db.basic8; t.drop(); diff --git a/jstests/core/batch_write_command_delete.js b/jstests/core/batch_write_command_delete.js index 37a65750524..f83a9984936 100644 --- a/jstests/core/batch_write_command_delete.js +++ b/jstests/core/batch_write_command_delete.js @@ -6,6 +6,7 @@ // assumes_unsharded_collection, // assumes_write_concern_unchanged, // requires_non_retryable_writes, +// requires_fastcount, // ] // diff --git a/jstests/core/batch_write_command_insert.js b/jstests/core/batch_write_command_insert.js index 962a4eb37ad..136727d159a 100644 --- a/jstests/core/batch_write_command_insert.js +++ b/jstests/core/batch_write_command_insert.js @@ -4,6 +4,7 @@ // @tags: [ // assumes_write_concern_unchanged, // cannot_create_unique_index_when_using_hashed_shard_key, +// requires_fastcount, // ] // diff --git a/jstests/core/batch_write_command_update.js b/jstests/core/batch_write_command_update.js index 24f86256d98..59c327db233 100644 --- a/jstests/core/batch_write_command_update.js +++ b/jstests/core/batch_write_command_update.js @@ -5,6 +5,7 @@ // assumes_unsharded_collection, // assumes_write_concern_unchanged, // requires_non_retryable_writes, +// requires_fastcount, // ] // diff --git a/jstests/core/big_object1.js b/jstests/core/big_object1.js index 8029cbb868f..7ed4c92dad6 100644 --- a/jstests/core/big_object1.js +++ b/jstests/core/big_object1.js @@ -1,3 +1,4 @@ +// @tags: [requires_fastcount, requires_collstats] t = db.big_object1; t.drop(); diff --git a/jstests/core/bulk_insert.js b/jstests/core/bulk_insert.js index 157b24aabba..91e81d62c11 100644 --- a/jstests/core/bulk_insert.js +++ b/jstests/core/bulk_insert.js @@ -1,4 +1,6 @@ // Tests bulk insert of docs from the shell +// +// @tags: [requires_fastcount] var coll = db.bulkInsertTest; coll.drop(); diff --git a/jstests/core/bypass_doc_validation.js b/jstests/core/bypass_doc_validation.js index 77e879d7c79..bfd3bc1e978 100644 --- a/jstests/core/bypass_doc_validation.js +++ b/jstests/core/bypass_doc_validation.js @@ -1,4 +1,4 @@ -// @tags: [does_not_support_stepdowns, requires_non_retryable_commands] +// @tags: [does_not_support_stepdowns, requires_non_retryable_commands, requires_fastcount] /** * Tests that various database commands respect the 'bypassDocumentValidation' flag: diff --git a/jstests/core/capped6.js b/jstests/core/capped6.js index c92006f0d01..6905a0f1f13 100644 --- a/jstests/core/capped6.js +++ b/jstests/core/capped6.js @@ -6,6 +6,7 @@ // # the replica set, whereas the latter must be routed to the primary. // assumes_read_preference_unchanged, // requires_non_retryable_commands, +// requires_fastcount, // ] (function() { var coll = db.capped6; diff --git a/jstests/core/capped_convertToCapped1.js b/jstests/core/capped_convertToCapped1.js index d3f35a7fa4d..3636c932358 100644 --- a/jstests/core/capped_convertToCapped1.js +++ b/jstests/core/capped_convertToCapped1.js @@ -1,4 +1,4 @@ -// @tags: [requires_non_retryable_commands] +// @tags: [requires_non_retryable_commands, requires_fastcount] // test cloneCollectionAsCapped diff --git a/jstests/core/capped_empty.js b/jstests/core/capped_empty.js index e43170405e3..aaac7639f2a 100644 --- a/jstests/core/capped_empty.js +++ b/jstests/core/capped_empty.js @@ -1,4 +1,4 @@ -// @tags: [requires_non_retryable_commands] +// @tags: [requires_non_retryable_commands, requires_fastcount] t = db.capped_empty; t.drop(); diff --git a/jstests/core/capped_max1.js b/jstests/core/capped_max1.js index e4fbda62233..55c6c98569f 100644 --- a/jstests/core/capped_max1.js +++ b/jstests/core/capped_max1.js @@ -1,4 +1,6 @@ -// test max docs in capped collection +// Test max docs in capped collection +// +// @tags: [requires_fastcount, requires_collstats] var t = db.capped_max1; t.drop(); diff --git a/jstests/core/check_shard_index.js b/jstests/core/check_shard_index.js index 28a9027b72c..d3c30d61dfa 100644 --- a/jstests/core/check_shard_index.js +++ b/jstests/core/check_shard_index.js @@ -1,4 +1,4 @@ -// @tags: [requires_non_retryable_writes] +// @tags: [requires_non_retryable_writes, requires_fastcount] // ------------------------- // CHECKSHARDINGINDEX TEST UTILS diff --git a/jstests/core/collection_truncate.js b/jstests/core/collection_truncate.js index c4e868046c8..dc97c5d5b38 100644 --- a/jstests/core/collection_truncate.js +++ b/jstests/core/collection_truncate.js @@ -1,4 +1,4 @@ -// @tags: [requires_non_retryable_commands] +// @tags: [requires_non_retryable_commands, requires_collstats] // SERVER-15033 truncate on a regular collection diff --git a/jstests/core/commands_namespace_parsing.js b/jstests/core/commands_namespace_parsing.js index 51b68ff9eaf..30301cd04dd 100644 --- a/jstests/core/commands_namespace_parsing.js +++ b/jstests/core/commands_namespace_parsing.js @@ -1,8 +1,13 @@ // Cannot implicitly shard accessed collections because the error response from the shard about // using the empty string as the out collection name is converted to an error and no longer retains // the "code" property. -// @tags: [assumes_unsharded_collection, does_not_support_stepdowns, requires_getmore, -// requires_non_retryable_commands] +// @tags: [ +// assumes_unsharded_collection, +// does_not_support_stepdowns, +// requires_getmore, +// requires_non_retryable_commands, +// requires_fastcount, +// ] // This file tests that commands namespace parsing rejects embedded null bytes. // Note that for each command, a properly formatted command object must be passed to the helper diff --git a/jstests/core/commands_with_uuid.js b/jstests/core/commands_with_uuid.js index 2086d31cabb..0080e16e478 100644 --- a/jstests/core/commands_with_uuid.js +++ b/jstests/core/commands_with_uuid.js @@ -1,6 +1,8 @@ /** * Tests that using a UUID as an argument to commands will retrieve results from the correct * collection. +* +* @tags: [requires_fastcount] */ (function() { diff --git a/jstests/core/copydatabase_no_id_index.js b/jstests/core/copydatabase_no_id_index.js index 0776626f643..64f95c9387a 100644 --- a/jstests/core/copydatabase_no_id_index.js +++ b/jstests/core/copydatabase_no_id_index.js @@ -1,4 +1,4 @@ -// @tags: [requires_non_retryable_commands] +// @tags: [requires_non_retryable_commands, requires_fastcount] /** * This test creates a collection with autoIndexId: false. It then copies the database and expects diff --git a/jstests/core/copydb.js b/jstests/core/copydb.js index 5939f62d975..e2f49145a74 100644 --- a/jstests/core/copydb.js +++ b/jstests/core/copydb.js @@ -1,4 +1,4 @@ -// @tags: [requires_non_retryable_commands] +// @tags: [requires_non_retryable_commands, requires_fastcount] // Basic tests for the copydb command. These only test copying from the same server; these do not // test the ability of copydb to pull a database from another server (with or without auth). diff --git a/jstests/core/count.js b/jstests/core/count.js index 9ec6a424c34..d0cfa377778 100644 --- a/jstests/core/count.js +++ b/jstests/core/count.js @@ -1,3 +1,5 @@ +// @tags: [requires_fastcount] + t = db.jstests_count; t.drop(); diff --git a/jstests/core/count11.js b/jstests/core/count11.js index 1a9c89f3357..f7eb398c6cb 100644 --- a/jstests/core/count11.js +++ b/jstests/core/count11.js @@ -1,6 +1,6 @@ // Cannot implicitly shard accessed collections because of collection existing when none // expected. -// @tags: [assumes_no_implicit_collection_creation_after_drop] +// @tags: [assumes_no_implicit_collection_creation_after_drop, requires_fastcount] // SERVER-8514: Test the count command returns an error to the user when given an invalid query // predicate, even when the collection doesn't exist. diff --git a/jstests/core/count2.js b/jstests/core/count2.js index 356e03ab6dd..9c8aaca7a32 100644 --- a/jstests/core/count2.js +++ b/jstests/core/count2.js @@ -1,4 +1,4 @@ -// @tags: [requires_getmore] +// @tags: [requires_getmore, requires_fastcount] t = db.count2; t.drop(); diff --git a/jstests/core/count5.js b/jstests/core/count5.js index 5a23fde5661..b89eb88d494 100644 --- a/jstests/core/count5.js +++ b/jstests/core/count5.js @@ -1,3 +1,4 @@ +// @tags: [requires_fastcount] t = db.count5; t.drop(); diff --git a/jstests/core/count6.js b/jstests/core/count6.js index c1268f66047..46fb428ef97 100644 --- a/jstests/core/count6.js +++ b/jstests/core/count6.js @@ -1,4 +1,6 @@ // Some correctness checks for fast and normal count modes, including with skip and limit. +// +// @tags: [requires_fastcount] t = db.jstests_count6; diff --git a/jstests/core/count_hint.js b/jstests/core/count_hint.js index da964cca202..7cbfc50dc0e 100644 --- a/jstests/core/count_hint.js +++ b/jstests/core/count_hint.js @@ -4,6 +4,8 @@ * - A bad argument to the hint() method should raise an error. * - The hint() method should support both the name of the index, and the object spec of the * index. + * + * @tags: [requires_fastcount] */ (function() { "use strict"; diff --git a/jstests/core/counta.js b/jstests/core/counta.js index a554943483b..027402af3ee 100644 --- a/jstests/core/counta.js +++ b/jstests/core/counta.js @@ -1,4 +1,7 @@ // Check that count returns 0 in some exception cases. +// +// @tags: [requires_fastcount] + (function() { 'use strict'; diff --git a/jstests/core/coveredIndex2.js b/jstests/core/coveredIndex2.js index 7f9983618fc..39a48dd3e0d 100644 --- a/jstests/core/coveredIndex2.js +++ b/jstests/core/coveredIndex2.js @@ -1,7 +1,7 @@ // Cannot implicitly shard accessed collections because queries on a sharded collection are not // able to be covered when they aren't on the shard key since the document needs to be fetched in // order to apply the SHARDING_FILTER stage. -// @tags: [assumes_unsharded_collection] +// @tags: [assumes_unsharded_collection, requires_fastcount] t = db["jstests_coveredIndex2"]; t.drop(); diff --git a/jstests/core/crud_api.js b/jstests/core/crud_api.js index 3a1f7418305..6c474a08296 100644 --- a/jstests/core/crud_api.js +++ b/jstests/core/crud_api.js @@ -5,6 +5,7 @@ // @tags: [ // assumes_unsharded_collection, // assumes_write_concern_unchanged, +// requires_fastcount, // ] (function() { diff --git a/jstests/core/cursor1.js b/jstests/core/cursor1.js index b6b577e2153..1cb00cc82fb 100644 --- a/jstests/core/cursor1.js +++ b/jstests/core/cursor1.js @@ -1,4 +1,4 @@ -// @tags: [requires_getmore] +// @tags: [requires_getmore, requires_fastcount] t = db.cursor1; t.drop(); diff --git a/jstests/core/cursor2.js b/jstests/core/cursor2.js index cf496db2c3f..413383adcb7 100644 --- a/jstests/core/cursor2.js +++ b/jstests/core/cursor2.js @@ -1,9 +1,11 @@ /** - * test to see if the count returned from the cursor is the number of objects that would be - *returned + * Test to see if the count returned from the cursor is the number of objects that would be + * returned * - * BUG 884 + * BUG 884 + * + * @tags: [requires_fastcount] */ function testCursorCountVsArrLen(dbConn) { var coll = dbConn.ed_db_cursor2_ccvsal; diff --git a/jstests/core/cursora.js b/jstests/core/cursora.js index 6a314c22c8f..db92e999eef 100644 --- a/jstests/core/cursora.js +++ b/jstests/core/cursora.js @@ -1,4 +1,4 @@ -// @tags: [requires_getmore, requires_non_retryable_writes] +// @tags: [requires_getmore, requires_non_retryable_writes, requires_fastcount] (function() { "use strict"; diff --git a/jstests/core/date3.js b/jstests/core/date3.js index 9f7204bb52a..80279a9559c 100644 --- a/jstests/core/date3.js +++ b/jstests/core/date3.js @@ -1,4 +1,6 @@ // Check dates before Unix epoch - SERVER-405 +// +// @tags: [requires_fastcount] t = db.date3; t.drop(); diff --git a/jstests/core/dbstats.js b/jstests/core/dbstats.js index 6289eab1f08..324f5dd7603 100644 --- a/jstests/core/dbstats.js +++ b/jstests/core/dbstats.js @@ -1,4 +1,6 @@ // Confirms that the dbStats command returns expected content. +// +// @tags: [requires_dbstats] (function() { "use strict"; diff --git a/jstests/core/doc_validation.js b/jstests/core/doc_validation.js index 1addda2168c..9acfffae4e3 100644 --- a/jstests/core/doc_validation.js +++ b/jstests/core/doc_validation.js @@ -1,7 +1,11 @@ // Cannot implicitly shard accessed collections because of collection existing when none // expected. -// @tags: [assumes_no_implicit_collection_creation_after_drop, requires_non_retryable_commands, -// requires_non_retryable_writes] +// @tags: [ +// assumes_no_implicit_collection_creation_after_drop, +// requires_non_retryable_commands, +// requires_non_retryable_writes, +// requires_fastcount, +// ] // Test basic inserts and updates with document validation. (function() { diff --git a/jstests/core/error5.js b/jstests/core/error5.js index c8592040433..edcfa059d25 100644 --- a/jstests/core/error5.js +++ b/jstests/core/error5.js @@ -1,3 +1,4 @@ +// @tags: [requires_fastcount] t = db.error5; t.drop(); diff --git a/jstests/core/eval3.js b/jstests/core/eval3.js index 6c5e8b7c56d..ac0f381c9ca 100644 --- a/jstests/core/eval3.js +++ b/jstests/core/eval3.js @@ -4,6 +4,7 @@ // assumes_unsharded_collection, // requires_eval_command, // requires_non_retryable_commands, +// requires_fastcount, // ] t = db.eval3; diff --git a/jstests/core/eval4.js b/jstests/core/eval4.js index 74d25b10184..375cb66b182 100644 --- a/jstests/core/eval4.js +++ b/jstests/core/eval4.js @@ -5,6 +5,7 @@ // requires_eval_command, // requires_non_retryable_commands, // requires_non_retryable_writes, +// requires_fastcount, // ] t = db.eval4; diff --git a/jstests/core/exists.js b/jstests/core/exists.js index a29f0cb1d45..da8ce45a490 100644 --- a/jstests/core/exists.js +++ b/jstests/core/exists.js @@ -1,3 +1,5 @@ +// @tags: [requires_fastcount] + t = db.jstests_exists; t.drop(); diff --git a/jstests/core/explain_batch_size.js b/jstests/core/explain_batch_size.js index 7f94adb13ce..fc4a1a6143c 100644 --- a/jstests/core/explain_batch_size.js +++ b/jstests/core/explain_batch_size.js @@ -3,6 +3,8 @@ // batch size is also tested in another smoke test jstest/explain1.js but that test // also covers the use of an indexed collection and includes a couple of test cases // using limit() +// +// @tags: [requires_fastcount] t = db.explain_batch_size; t.drop(); diff --git a/jstests/core/explain_count.js b/jstests/core/explain_count.js index d494a0c0584..d7c8a876b04 100644 --- a/jstests/core/explain_count.js +++ b/jstests/core/explain_count.js @@ -1,4 +1,6 @@ // Test running explains on count commands. +// +// @tags: [requires_fastcount] load("jstests/libs/analyze_plan.js"); // For assertExplainCount. load("jstests/libs/fixture_helpers.js"); // For isMongos and isSharded. diff --git a/jstests/core/explain_delete.js b/jstests/core/explain_delete.js index d65a4b1f748..55462fc2663 100644 --- a/jstests/core/explain_delete.js +++ b/jstests/core/explain_delete.js @@ -1,4 +1,4 @@ -// @tags: [requires_non_retryable_writes] +// @tags: [requires_non_retryable_writes, requires_fastcount] // Tests for explaining the delete command. diff --git a/jstests/core/explain_shell_helpers.js b/jstests/core/explain_shell_helpers.js index ac630008247..910c6947e11 100644 --- a/jstests/core/explain_shell_helpers.js +++ b/jstests/core/explain_shell_helpers.js @@ -1,6 +1,6 @@ // Cannot implicitly shard accessed collections because the explain output from a mongod when run // against a sharded collection is wrapped in a "shards" object with keys for each shard. -// @tags: [assumes_unsharded_collection, does_not_support_stepdowns] +// @tags: [assumes_unsharded_collection, does_not_support_stepdowns, requires_fastcount] // Tests for the .explain() shell helper, which provides syntactic sugar for the explain command. diff --git a/jstests/core/explain_upsert.js b/jstests/core/explain_upsert.js index aab8758366a..6da5921b8f0 100644 --- a/jstests/core/explain_upsert.js +++ b/jstests/core/explain_upsert.js @@ -1,7 +1,7 @@ // Cannot implicitly shard accessed collections because of following errmsg: A single // update/delete on a sharded collection must contain an exact match on _id or contain the shard // key. -// @tags: [assumes_unsharded_collection] +// @tags: [assumes_unsharded_collection, requires_fastcount] // Test explain for {upsert: true} updates. diff --git a/jstests/core/find2.js b/jstests/core/find2.js index 2992bb683f1..a793c60b804 100644 --- a/jstests/core/find2.js +++ b/jstests/core/find2.js @@ -1,4 +1,6 @@ // Test object id sorting. +// +// @tags: [requires_fastcount] function testObjectIdFind(db) { r = db.ed_db_find2_oif; diff --git a/jstests/core/find5.js b/jstests/core/find5.js index 1771c1fbbdb..41ed0034b5c 100644 --- a/jstests/core/find5.js +++ b/jstests/core/find5.js @@ -1,3 +1,5 @@ +// @tags: [requires_fastcount] + (function() { "use strict"; diff --git a/jstests/core/find6.js b/jstests/core/find6.js index 96d76192814..35a853652d6 100644 --- a/jstests/core/find6.js +++ b/jstests/core/find6.js @@ -1,3 +1,4 @@ +// @tags: [requires_fastcount] t = db.find6; t.drop(); diff --git a/jstests/core/find_and_modify.js b/jstests/core/find_and_modify.js index e86ba4eec31..d96695a4f83 100644 --- a/jstests/core/find_and_modify.js +++ b/jstests/core/find_and_modify.js @@ -1,7 +1,7 @@ // Cannot implicitly shard accessed collections because of following errmsg: A single // update/delete on a sharded collection must contain an exact match on _id or contain the shard // key. -// @tags: [assumes_unsharded_collection] +// @tags: [assumes_unsharded_collection, requires_fastcount] t = db.find_and_modify; t.drop(); diff --git a/jstests/core/find_and_modify4.js b/jstests/core/find_and_modify4.js index 0c6942ab055..15fb93c8a9f 100644 --- a/jstests/core/find_and_modify4.js +++ b/jstests/core/find_and_modify4.js @@ -1,7 +1,7 @@ // Cannot implicitly shard accessed collections because of following errmsg: A single // update/delete on a sharded collection must contain an exact match on _id or contain the shard // key. -// @tags: [assumes_unsharded_collection] +// @tags: [assumes_unsharded_collection, requires_fastcount] t = db.find_and_modify4; t.drop(); diff --git a/jstests/core/find_and_modify_server6254.js b/jstests/core/find_and_modify_server6254.js index 1eca30e31a9..5a0dae9db22 100644 --- a/jstests/core/find_and_modify_server6254.js +++ b/jstests/core/find_and_modify_server6254.js @@ -1,7 +1,7 @@ // Cannot implicitly shard accessed collections because of following errmsg: A single // update/delete on a sharded collection must contain an exact match on _id or contain the shard // key. -// @tags: [assumes_unsharded_collection] +// @tags: [assumes_unsharded_collection, requires_fastcount] t = db.find_and_modify_server6254; t.drop(); diff --git a/jstests/core/find_dedup.js b/jstests/core/find_dedup.js index 7e9bef61160..a2ac0bfa3d8 100644 --- a/jstests/core/find_dedup.js +++ b/jstests/core/find_dedup.js @@ -1,4 +1,7 @@ // Test that duplicate query results are not returned. +// +// @tags: [requires_fastcount] + (function() { "use strict"; diff --git a/jstests/core/fsync.js b/jstests/core/fsync.js index c5ba3fe13a0..330767cf03a 100644 --- a/jstests/core/fsync.js +++ b/jstests/core/fsync.js @@ -7,7 +7,7 @@ * - Confirm that the command can be run repeatedly without breaking things * - Confirm that the pseudo commands and eval can perform fsyncLock/Unlock * - * @tags: [requires_eval_command] + * @tags: [requires_eval_command, requires_fastcount] */ (function() { "use strict"; diff --git a/jstests/core/geo1.js b/jstests/core/geo1.js index c33a5f8919c..35bba816df5 100644 --- a/jstests/core/geo1.js +++ b/jstests/core/geo1.js @@ -1,6 +1,6 @@ // Cannot implicitly shard accessed collections because of extra shard key index in sharded // collection. -// @tags: [assumes_no_implicit_index_creation] +// @tags: [assumes_no_implicit_index_creation, requires_fastcount] t = db.geo1; t.drop(); diff --git a/jstests/core/geo2.js b/jstests/core/geo2.js index 50442a3e04e..558e6c81099 100644 --- a/jstests/core/geo2.js +++ b/jstests/core/geo2.js @@ -1,3 +1,5 @@ +// @tags: [requires_fastcount] + t = db.geo2; t.drop(); diff --git a/jstests/core/geo3.js b/jstests/core/geo3.js index aef8a2e5711..de8e1b2bf6a 100644 --- a/jstests/core/geo3.js +++ b/jstests/core/geo3.js @@ -1,3 +1,5 @@ +// @tags: [requires_fastcount] + t = db.geo3; t.drop(); diff --git a/jstests/core/geo_big_polygon.js b/jstests/core/geo_big_polygon.js index 2c749486dab..43738e58ae7 100644 --- a/jstests/core/geo_big_polygon.js +++ b/jstests/core/geo_big_polygon.js @@ -1,4 +1,4 @@ -// @tags: [requires_non_retryable_writes] +// @tags: [requires_non_retryable_writes, requires_fastcount] // // Test of sample big polygon functionality diff --git a/jstests/core/geo_big_polygon2.js b/jstests/core/geo_big_polygon2.js index fabb31d5b8b..3f93d44ef0a 100644 --- a/jstests/core/geo_big_polygon2.js +++ b/jstests/core/geo_big_polygon2.js @@ -1,4 +1,4 @@ -// @tags: [requires_non_retryable_writes] +// @tags: [requires_non_retryable_writes, requires_fastcount] // // Big Polygon related tests diff --git a/jstests/core/geo_big_polygon3.js b/jstests/core/geo_big_polygon3.js index ce2ecd55da3..fdcd3f3b5cf 100644 --- a/jstests/core/geo_big_polygon3.js +++ b/jstests/core/geo_big_polygon3.js @@ -1,4 +1,4 @@ -// @tags: [does_not_support_stepdowns, requires_non_retryable_writes] +// @tags: [does_not_support_stepdowns, requires_non_retryable_writes, requires_fastcount] // // Big Polygon edge cases diff --git a/jstests/core/geo_center_sphere1.js b/jstests/core/geo_center_sphere1.js index 1ee46b03486..0e4b0536b1d 100644 --- a/jstests/core/geo_center_sphere1.js +++ b/jstests/core/geo_center_sphere1.js @@ -1,3 +1,5 @@ +// @tags: [requires_fastcount] + t = db.geo_center_sphere1; function test(index) { diff --git a/jstests/core/geo_circle1.js b/jstests/core/geo_circle1.js index c5b6841b9a8..d6a18112323 100644 --- a/jstests/core/geo_circle1.js +++ b/jstests/core/geo_circle1.js @@ -1,3 +1,4 @@ +// @tags: [requires_fastcount] t = db.geo_circle1; t.drop(); diff --git a/jstests/core/geo_distinct.js b/jstests/core/geo_distinct.js index 5ba193bca00..11381a79433 100644 --- a/jstests/core/geo_distinct.js +++ b/jstests/core/geo_distinct.js @@ -1,6 +1,9 @@ // Tests distinct with geospatial field values. // 1. Test distinct with geo values for 'key' (SERVER-2135) // 2. Test distinct with geo predicates for 'query' (SERVER-13769) +// +// @tags: [requires_fastcount] + (function() { "use strict"; const coll = db.geo_distinct; diff --git a/jstests/core/geo_fiddly_box.js b/jstests/core/geo_fiddly_box.js index 4e33780112d..b99a28c01f7 100644 --- a/jstests/core/geo_fiddly_box.js +++ b/jstests/core/geo_fiddly_box.js @@ -1,4 +1,6 @@ // Reproduces simple test for SERVER-2832 +// +// @tags: [requires_fastcount] // The setup to reproduce was/is to create a set of points where the // "expand" portion of the geo-lookup expands the 2d range in only one diff --git a/jstests/core/geo_group.js b/jstests/core/geo_group.js index 52b6ec84ba4..72d91b7907d 100644 --- a/jstests/core/geo_group.js +++ b/jstests/core/geo_group.js @@ -1,6 +1,7 @@ // Cannot implicitly shard accessed collections because group is not supported on sharded // collections. -// @tags: [assumes_unsharded_collection] +// +// @tags: [assumes_unsharded_collection, requires_fastcount] t = db.geo_group; t.drop(); diff --git a/jstests/core/geo_mindistance.js b/jstests/core/geo_mindistance.js index 82f3522c213..fe694ea2c0e 100644 --- a/jstests/core/geo_mindistance.js +++ b/jstests/core/geo_mindistance.js @@ -1,4 +1,7 @@ // Test $minDistance option for $near and $nearSphere queries, and geoNear command. SERVER-9395. +// +// @tags: [requires_fastcount] + (function() { "use strict"; diff --git a/jstests/core/geo_polygon2.js b/jstests/core/geo_polygon2.js index 8a011beba0c..6891cd7c8a8 100644 --- a/jstests/core/geo_polygon2.js +++ b/jstests/core/geo_polygon2.js @@ -1,6 +1,7 @@ // // More tests for N-dimensional polygon querying // +// @tags: [requires_fastcount] // Create a polygon of some shape (no holes) // using turtle graphics. Basically, will look like a very contorted octopus (quad-pus?) shape. diff --git a/jstests/core/geo_s2twofields.js b/jstests/core/geo_s2twofields.js index 564d6fcd91a..ada5e96f6d5 100644 --- a/jstests/core/geo_s2twofields.js +++ b/jstests/core/geo_s2twofields.js @@ -1,5 +1,8 @@ // Verify that we can index multiple geo fields with 2dsphere, and that // performance is what we expect it to be with indexing both fields. +// +// @tags: [requires_fastcount] + var t = db.geo_s2twofields; t.drop(); diff --git a/jstests/core/getmore_invalidated_cursors.js b/jstests/core/getmore_invalidated_cursors.js index adf9b17fcd5..37f2a508013 100644 --- a/jstests/core/getmore_invalidated_cursors.js +++ b/jstests/core/getmore_invalidated_cursors.js @@ -1,4 +1,4 @@ -// @tags: [requires_getmore, requires_non_retryable_commands] +// @tags: [requires_getmore, requires_non_retryable_commands, requires_collstats] // Tests that running a getMore on a cursor that has been invalidated by something like a collection // drop will return an appropriate error message. diff --git a/jstests/core/hashindex1.js b/jstests/core/hashindex1.js index b79deeee445..ef94f32da08 100644 --- a/jstests/core/hashindex1.js +++ b/jstests/core/hashindex1.js @@ -1,6 +1,7 @@ // Cannot implicitly shard accessed collections because of extra shard key index in sharded // collection. -// @tags: [assumes_no_implicit_index_creation] +// +// @tags: [assumes_no_implicit_index_creation, requires_fastcount] var t = db.hashindex1; t.drop(); diff --git a/jstests/core/id1.js b/jstests/core/id1.js index dedf9c449c5..79e26e33e90 100644 --- a/jstests/core/id1.js +++ b/jstests/core/id1.js @@ -1,3 +1,4 @@ +// @tags: [requires_fastcount] t = db.id1; t.drop(); diff --git a/jstests/core/inc1.js b/jstests/core/inc1.js index 75192ebe013..50a7892e5a4 100644 --- a/jstests/core/inc1.js +++ b/jstests/core/inc1.js @@ -1,3 +1,4 @@ +// @tags: [requires_fastcount] t = db.inc1; t.drop(); diff --git a/jstests/core/index13.js b/jstests/core/index13.js index cea4671c540..ec35bc8a669 100644 --- a/jstests/core/index13.js +++ b/jstests/core/index13.js @@ -1,4 +1,4 @@ -// @tags: [requires_non_retryable_writes] +// @tags: [requires_non_retryable_writes, requires_fastcount] // Top level match fields within an $elemMatch clause may constrain multiple subfields from a // compound multikey index. SERVER-3104 diff --git a/jstests/core/index5.js b/jstests/core/index5.js index 11cfa1882e4..f46654c6602 100644 --- a/jstests/core/index5.js +++ b/jstests/core/index5.js @@ -1,4 +1,6 @@ // index5.js - test reverse direction index +// +// @tags: [requires_fastcount] function validate() { assert.eq(2, t.find().count()); diff --git a/jstests/core/index8.js b/jstests/core/index8.js index b74cbb5c708..6acbe0e545d 100644 --- a/jstests/core/index8.js +++ b/jstests/core/index8.js @@ -1,6 +1,6 @@ // Cannot implicitly shard accessed collections because of not being able to create unique index // using hashed shard key pattern. -// @tags: [cannot_create_unique_index_when_using_hashed_shard_key] +// @tags: [cannot_create_unique_index_when_using_hashed_shard_key, requires_fastcount] // Test key uniqueness diff --git a/jstests/core/index_bigkeys.js b/jstests/core/index_bigkeys.js index 6d98859132e..1c995ed4273 100644 --- a/jstests/core/index_bigkeys.js +++ b/jstests/core/index_bigkeys.js @@ -1,6 +1,6 @@ // Cannot implicitly shard accessed collections because of extra shard key index in sharded // collection. -// @tags: [assumes_no_implicit_index_creation] +// @tags: [assumes_no_implicit_index_creation, requires_fastcount] t = db.bigkeysidxtest; diff --git a/jstests/core/index_bigkeys_nofail.js b/jstests/core/index_bigkeys_nofail.js index ffbfea53779..be58427ba6d 100644 --- a/jstests/core/index_bigkeys_nofail.js +++ b/jstests/core/index_bigkeys_nofail.js @@ -1,4 +1,4 @@ -// @tags: [does_not_support_stepdowns, requires_non_retryable_writes] +// @tags: [does_not_support_stepdowns, requires_non_retryable_writes, requires_fastcount] // SERVER-16497: Check that failIndexKeyTooLong setting works (function() { diff --git a/jstests/core/index_bigkeys_update.js b/jstests/core/index_bigkeys_update.js index 73be9c77b94..9ecc5e4ecd6 100644 --- a/jstests/core/index_bigkeys_update.js +++ b/jstests/core/index_bigkeys_update.js @@ -1,3 +1,4 @@ +// @tags: [requires_fastcount] bigString = ""; while (bigString.length < 16000) diff --git a/jstests/core/index_sparse1.js b/jstests/core/index_sparse1.js index 9322415e04e..a7c1e8605ef 100644 --- a/jstests/core/index_sparse1.js +++ b/jstests/core/index_sparse1.js @@ -1,6 +1,6 @@ // Cannot implicitly shard accessed collections because of extra shard key index in sharded // collection. -// @tags: [assumes_no_implicit_index_creation, requires_non_retryable_writes] +// @tags: [assumes_no_implicit_index_creation, requires_non_retryable_writes, requires_fastcount] t = db.index_sparse1; t.drop(); diff --git a/jstests/core/index_sparse2.js b/jstests/core/index_sparse2.js index 0cb72567e57..148ad70b203 100644 --- a/jstests/core/index_sparse2.js +++ b/jstests/core/index_sparse2.js @@ -1,6 +1,6 @@ // Cannot implicitly shard accessed collections because of extra shard key index in sharded // collection. -// @tags: [assumes_no_implicit_index_creation] +// @tags: [assumes_no_implicit_index_creation, requires_fastcount] t = db.index_sparse2; t.drop(); diff --git a/jstests/core/indexa.js b/jstests/core/indexa.js index 33ffaa4bf78..90e74adc4f4 100644 --- a/jstests/core/indexa.js +++ b/jstests/core/indexa.js @@ -1,6 +1,6 @@ // Cannot implicitly shard accessed collections because of extra shard key index in sharded // collection. -// @tags: [assumes_no_implicit_index_creation] +// @tags: [assumes_no_implicit_index_creation, requires_fastcount] // unique index constraint test for updates // case where object doesn't grow tested here diff --git a/jstests/core/indexb.js b/jstests/core/indexb.js index c852ff083f4..6890dda3cbc 100644 --- a/jstests/core/indexb.js +++ b/jstests/core/indexb.js @@ -1,6 +1,6 @@ // Cannot implicitly shard accessed collections because of not being able to create unique index // using hashed shard key pattern. -// @tags: [cannot_create_unique_index_when_using_hashed_shard_key] +// @tags: [cannot_create_unique_index_when_using_hashed_shard_key, requires_fastcount] // unique index test for a case where the object grows // and must move diff --git a/jstests/core/indexe.js b/jstests/core/indexe.js index 3b55c4fb85a..6961229c682 100644 --- a/jstests/core/indexe.js +++ b/jstests/core/indexe.js @@ -1,4 +1,4 @@ -// @tags: [requires_getmore] +// @tags: [requires_getmore, requires_fastcount] t = db.indexe; t.drop(); diff --git a/jstests/core/insert1.js b/jstests/core/insert1.js index d6886491999..f3cb243dad1 100644 --- a/jstests/core/insert1.js +++ b/jstests/core/insert1.js @@ -1,3 +1,5 @@ +// @tags: [requires_fastcount] + t = db.insert1; t.drop(); diff --git a/jstests/core/insert2.js b/jstests/core/insert2.js index 3b3b147af0e..c039444ed0f 100644 --- a/jstests/core/insert2.js +++ b/jstests/core/insert2.js @@ -1,6 +1,6 @@ // Cannot implicitly shard accessed collections because of collection existing when none // expected. -// @tags: [assumes_no_implicit_collection_creation_after_drop] +// @tags: [assumes_no_implicit_collection_creation_after_drop, requires_collstats] // Create a new connection object so it won't affect the global connection when we modify // it's settings. diff --git a/jstests/core/insert_id_undefined.js b/jstests/core/insert_id_undefined.js index 5dc2c9a6862..b1884d24d2a 100644 --- a/jstests/core/insert_id_undefined.js +++ b/jstests/core/insert_id_undefined.js @@ -1,6 +1,6 @@ // Cannot implicitly shard accessed collections because of collection existing when none // expected. -// @tags: [assumes_no_implicit_collection_creation_after_drop] +// @tags: [assumes_no_implicit_collection_creation_after_drop, requires_fastcount] // ensure a document with _id undefined cannot be saved t = db.insert_id_undefined; diff --git a/jstests/core/insert_long_index_key.js b/jstests/core/insert_long_index_key.js index 934b51b0369..edbbd48200a 100644 --- a/jstests/core/insert_long_index_key.js +++ b/jstests/core/insert_long_index_key.js @@ -1,3 +1,5 @@ +// @tags: [requires_fastcount] + t = db.insert_long_index_key; t.drop(); diff --git a/jstests/core/js3.js b/jstests/core/js3.js index d22a579141b..d9c0374360c 100644 --- a/jstests/core/js3.js +++ b/jstests/core/js3.js @@ -4,6 +4,7 @@ // assumes_unsharded_collection, // requires_eval_command, // requires_non_retryable_commands, +// requires_fastcount, // ] t = db.jstests_js3; diff --git a/jstests/core/js9.js b/jstests/core/js9.js index fdeb2615944..0b9278a7d12 100644 --- a/jstests/core/js9.js +++ b/jstests/core/js9.js @@ -4,6 +4,7 @@ // assumes_unsharded_collection, // requires_eval_command, // requires_non_retryable_commands, +// requires_fastcount, // ] c = db.jstests_js9; diff --git a/jstests/core/list_indexes_invalidation.js b/jstests/core/list_indexes_invalidation.js index 68742007bbf..7dc70e822e7 100644 --- a/jstests/core/list_indexes_invalidation.js +++ b/jstests/core/list_indexes_invalidation.js @@ -1,6 +1,6 @@ // Cannot implicitly shard accessed collections because renameCollection command not supported // on sharded collections. -// @tags: [assumes_unsharded_collection, requires_non_retryable_commands] +// @tags: [assumes_unsharded_collection, requires_non_retryable_commands, requires_fastcount] // SERVER-24963/SERVER-27930 Missing invalidation for system.indexes writes (function() { diff --git a/jstests/core/list_namespaces_invalidation.js b/jstests/core/list_namespaces_invalidation.js index a97633c7ca9..687f680ed09 100644 --- a/jstests/core/list_namespaces_invalidation.js +++ b/jstests/core/list_namespaces_invalidation.js @@ -1,4 +1,4 @@ -// @tags: [requires_non_retryable_commands] +// @tags: [requires_non_retryable_commands, requires_fastcount] // SERVER-27996/SERVER-28022 Missing invalidation for system.namespaces writes (function() { diff --git a/jstests/core/loadserverscripts.js b/jstests/core/loadserverscripts.js index 17ab816f1fe..459daea093d 100644 --- a/jstests/core/loadserverscripts.js +++ b/jstests/core/loadserverscripts.js @@ -1,4 +1,4 @@ -// @tags: [requires_non_retryable_writes] +// @tags: [requires_non_retryable_writes, requires_fastcount] // Test db.loadServerScripts() diff --git a/jstests/core/max_time_ms.js b/jstests/core/max_time_ms.js index 9b9b11ed7d5..57bd184f92e 100644 --- a/jstests/core/max_time_ms.js +++ b/jstests/core/max_time_ms.js @@ -6,6 +6,7 @@ // # latter must be routed to the primary. // assumes_read_preference_unchanged, // requires_getmore, +// requires_fastcount // ] var t = db.max_time_ms; diff --git a/jstests/core/mr1.js b/jstests/core/mr1.js index 12aeaf0cd7f..9b7dd8f3063 100644 --- a/jstests/core/mr1.js +++ b/jstests/core/mr1.js @@ -1,4 +1,4 @@ -// @tags: [does_not_support_stepdowns, requires_getmore] +// @tags: [does_not_support_stepdowns, requires_getmore, requires_fastcount] t = db.mr1; t.drop(); diff --git a/jstests/core/mr_bigobject.js b/jstests/core/mr_bigobject.js index bf85c39c7b6..4b58661330f 100644 --- a/jstests/core/mr_bigobject.js +++ b/jstests/core/mr_bigobject.js @@ -1,4 +1,4 @@ -// @tags: [does_not_support_stepdowns] +// @tags: [does_not_support_stepdowns, requires_fastcount] t = db.mr_bigobject; t.drop(); diff --git a/jstests/core/multi2.js b/jstests/core/multi2.js index d5111c31913..8c1c4ea5f3c 100644 --- a/jstests/core/multi2.js +++ b/jstests/core/multi2.js @@ -1,3 +1,4 @@ +// @tags: [requires_fastcount] t = db.multi2; t.drop(); diff --git a/jstests/core/nestedarr1.js b/jstests/core/nestedarr1.js index 049e09980d7..9fc8ef3c582 100644 --- a/jstests/core/nestedarr1.js +++ b/jstests/core/nestedarr1.js @@ -1,4 +1,4 @@ -// @tags: [requires_getmore] +// @tags: [requires_getmore, requires_fastcount] /** * Inserts documents with an indexed nested array field, progressively increasing the nesting diff --git a/jstests/core/nestedobj1.js b/jstests/core/nestedobj1.js index 70575b2d3a6..ea1984e7954 100644 --- a/jstests/core/nestedobj1.js +++ b/jstests/core/nestedobj1.js @@ -1,4 +1,4 @@ -// @tags: [requires_getmore] +// @tags: [requires_getmore, requires_fastcount] /** * Inserts documents with an indexed nested document field, progressively increasing the nesting diff --git a/jstests/core/nin.js b/jstests/core/nin.js index e7bb66bed93..36ed47550e0 100644 --- a/jstests/core/nin.js +++ b/jstests/core/nin.js @@ -1,3 +1,5 @@ +// @tags: [requires_fastcount] + t = db.jstests_nin; t.drop(); diff --git a/jstests/core/not1.js b/jstests/core/not1.js index 576c5817940..1039ae7c910 100644 --- a/jstests/core/not1.js +++ b/jstests/core/not1.js @@ -1,3 +1,4 @@ +// @tags: [requires_fastcount] t = db.not1; t.drop(); diff --git a/jstests/core/operation_latency_histogram.js b/jstests/core/operation_latency_histogram.js index e0fc3dfaf6c..22ec77fa817 100644 --- a/jstests/core/operation_latency_histogram.js +++ b/jstests/core/operation_latency_histogram.js @@ -4,7 +4,7 @@ // stage. The former operation must be routed to the primary in a replica set, whereas the latter // may be routed to a secondary. // -// @tags: [assumes_read_preference_unchanged] +// @tags: [assumes_read_preference_unchanged, requires_collstats] (function() { "use strict"; diff --git a/jstests/core/or4.js b/jstests/core/or4.js index 700bb7d336f..71237eb36af 100644 --- a/jstests/core/or4.js +++ b/jstests/core/or4.js @@ -1,7 +1,13 @@ // Cannot implicitly shard accessed collections because of unsupported group operator on sharded // collection. -// @tags: [assumes_unsharded_collection, does_not_support_stepdowns, requires_getmore, -// requires_non_retryable_writes] +// @tags: [ +// assumes_unsharded_collection, +// does_not_support_stepdowns, +// requires_getmore, +// requires_non_retryable_writes, +// requires_fastcount, +// ] + (function() { "use strict"; diff --git a/jstests/core/oro.js b/jstests/core/oro.js index 810be865649..65e9168029a 100644 --- a/jstests/core/oro.js +++ b/jstests/core/oro.js @@ -1,4 +1,4 @@ -// @tags: [requires_getmore] +// @tags: [requires_getmore, requires_collstats] // Test $or query with several clauses on separate indexes. diff --git a/jstests/core/profile1.js b/jstests/core/profile1.js index 977bf933be3..4109c3ac55d 100644 --- a/jstests/core/profile1.js +++ b/jstests/core/profile1.js @@ -1,4 +1,4 @@ -// @tags: [does_not_support_stepdowns, requires_non_retryable_commands] +// @tags: [does_not_support_stepdowns, requires_non_retryable_commands, requires_collstats] (function() { "use strict"; diff --git a/jstests/core/profile_count.js b/jstests/core/profile_count.js index 2fc33b77f3a..be359f91ae6 100644 --- a/jstests/core/profile_count.js +++ b/jstests/core/profile_count.js @@ -1,4 +1,4 @@ -// @tags: [does_not_support_stepdowns] +// @tags: [does_not_support_stepdowns, requires_fastcount] // Confirms that profiled count execution contains all expected metrics with proper values. diff --git a/jstests/core/profile_sampling.js b/jstests/core/profile_sampling.js index 789b11a0440..533fd848214 100644 --- a/jstests/core/profile_sampling.js +++ b/jstests/core/profile_sampling.js @@ -1,5 +1,5 @@ // Confirms that the number of profiled operations is consistent with the sampleRate, if set. -// @tags: [does_not_support_stepdowns] +// @tags: [does_not_support_stepdowns, requires_fastcount] (function() { "use strict"; diff --git a/jstests/core/pull2.js b/jstests/core/pull2.js index bc9b1acba4b..a1b79955bb0 100644 --- a/jstests/core/pull2.js +++ b/jstests/core/pull2.js @@ -1,7 +1,7 @@ // Cannot implicitly shard accessed collections because of following errmsg: A single // update/delete on a sharded collection must contain an exact match on _id or contain the shard // key. -// @tags: [assumes_unsharded_collection] +// @tags: [assumes_unsharded_collection, requires_fastcount] t = db.pull2; t.drop(); diff --git a/jstests/core/query1.js b/jstests/core/query1.js index 9936ce18e92..7e16a03a8fc 100644 --- a/jstests/core/query1.js +++ b/jstests/core/query1.js @@ -1,3 +1,4 @@ +// @tags: [requires_fastcount] t = db.query1; t.drop(); diff --git a/jstests/core/ref2.js b/jstests/core/ref2.js index d0c21da257f..6b284b1f59f 100644 --- a/jstests/core/ref2.js +++ b/jstests/core/ref2.js @@ -1,3 +1,4 @@ +// @tags: [requires_fastcount] t = db.ref2; t.drop(); diff --git a/jstests/core/regex2.js b/jstests/core/regex2.js index fe933892834..5f7aff5d219 100644 --- a/jstests/core/regex2.js +++ b/jstests/core/regex2.js @@ -1,3 +1,4 @@ +// @tags: [requires_fastcount] t = db.regex2; t.drop(); diff --git a/jstests/core/remove.js b/jstests/core/remove.js index d02f107a189..37754c74190 100644 --- a/jstests/core/remove.js +++ b/jstests/core/remove.js @@ -1,4 +1,4 @@ -// @tags: [requires_non_retryable_writes] +// @tags: [requires_non_retryable_writes, requires_fastcount] // remove.js // unit test for db remove diff --git a/jstests/core/remove3.js b/jstests/core/remove3.js index 66a29893daa..6f0a94589e9 100644 --- a/jstests/core/remove3.js +++ b/jstests/core/remove3.js @@ -1,4 +1,4 @@ -// @tags: [requires_non_retryable_writes] +// @tags: [requires_non_retryable_writes, requires_fastcount] t = db.remove3; t.drop(); diff --git a/jstests/core/remove6.js b/jstests/core/remove6.js index 3e977924e60..b91d28fa4e5 100644 --- a/jstests/core/remove6.js +++ b/jstests/core/remove6.js @@ -1,4 +1,4 @@ -// @tags: [requires_non_retryable_writes] +// @tags: [requires_non_retryable_writes, requires_fastcount] t = db.remove6; t.drop(); diff --git a/jstests/core/remove8.js b/jstests/core/remove8.js index ab82a915449..4dd68fd186d 100644 --- a/jstests/core/remove8.js +++ b/jstests/core/remove8.js @@ -5,6 +5,7 @@ // requires_eval_command, // requires_non_retryable_commands, // requires_non_retryable_writes, +// requires_fastcount, // ] t = db.remove8; diff --git a/jstests/core/remove_justone.js b/jstests/core/remove_justone.js index 6dbe2bdac48..f5345627e34 100644 --- a/jstests/core/remove_justone.js +++ b/jstests/core/remove_justone.js @@ -1,7 +1,7 @@ // Cannot implicitly shard accessed collections because of following errmsg: A single // update/delete on a sharded collection must contain an exact match on _id or contain the shard // key. -// @tags: [assumes_unsharded_collection, requires_non_retryable_writes] +// @tags: [assumes_unsharded_collection, requires_non_retryable_writes, requires_fastcount] t = db.remove_justone; t.drop(); diff --git a/jstests/core/remove_undefined.js b/jstests/core/remove_undefined.js index c13e147fbc3..c0c031a5763 100644 --- a/jstests/core/remove_undefined.js +++ b/jstests/core/remove_undefined.js @@ -1,4 +1,4 @@ -// @tags: [requires_non_retryable_writes] +// @tags: [requires_non_retryable_writes, requires_fastcount] (function() { "use strict"; diff --git a/jstests/core/removea.js b/jstests/core/removea.js index 92485198f30..082833b503a 100644 --- a/jstests/core/removea.js +++ b/jstests/core/removea.js @@ -1,4 +1,4 @@ -// @tags: [requires_non_retryable_writes] +// @tags: [requires_non_retryable_writes, requires_fastcount] // Test removal of a substantial proportion of inserted documents. (function() { diff --git a/jstests/core/removeb.js b/jstests/core/removeb.js index 14fd23b2e54..f5b038bf2c8 100644 --- a/jstests/core/removeb.js +++ b/jstests/core/removeb.js @@ -1,4 +1,4 @@ -// @tags: [requires_non_retryable_writes] +// @tags: [requires_non_retryable_writes, requires_fastcount] // Test removal of Records that have been reused since the remove operation began. SERVER-5198 diff --git a/jstests/core/rename.js b/jstests/core/rename.js index 63f1fbefaf6..6e40f8a1950 100644 --- a/jstests/core/rename.js +++ b/jstests/core/rename.js @@ -1,4 +1,4 @@ -// @tags: [requires_non_retryable_commands] +// @tags: [requires_non_retryable_commands, requires_fastcount] admin = db.getMongo().getDB("admin"); diff --git a/jstests/core/rename2.js b/jstests/core/rename2.js index d774553e9b9..6884beb61ec 100644 --- a/jstests/core/rename2.js +++ b/jstests/core/rename2.js @@ -1,4 +1,4 @@ -// @tags: [requires_non_retryable_commands] +// @tags: [requires_non_retryable_commands, requires_fastcount] a = db.rename2a; b = db.rename2b; diff --git a/jstests/core/rename7.js b/jstests/core/rename7.js index 1805461cfe1..9b318e91c59 100644 --- a/jstests/core/rename7.js +++ b/jstests/core/rename7.js @@ -1,4 +1,4 @@ -// @tags: [requires_non_retryable_commands] +// @tags: [requires_non_retryable_commands, requires_fastcount] // *************************************************************** // rename7.js diff --git a/jstests/core/server9385.js b/jstests/core/server9385.js index 5e2a82a7ef2..4eb11076139 100644 --- a/jstests/core/server9385.js +++ b/jstests/core/server9385.js @@ -1,4 +1,7 @@ // SERVER-9385 ensure saving a document derived from bson->js conversion doesn't lose it's _id +// +// @tags: [requires_fastcount] + t = db.server9385; t.drop(); diff --git a/jstests/core/shellstartparallel.js b/jstests/core/shellstartparallel.js index 7e288e0d589..8dfd1604dcc 100644 --- a/jstests/core/shellstartparallel.js +++ b/jstests/core/shellstartparallel.js @@ -1,3 +1,5 @@ +// @tags: [requires_fastcount] + function f() { throw Error("intentional_throw_to_test_assert_throws"); } diff --git a/jstests/core/sort10.js b/jstests/core/sort10.js index 207be0226fa..167cf74bbfc 100644 --- a/jstests/core/sort10.js +++ b/jstests/core/sort10.js @@ -1,4 +1,7 @@ // signed dates check +// +// @tags: [requires_fastcount] + t = db.sort10; function checkSorting1(opts) { diff --git a/jstests/core/splitvector.js b/jstests/core/splitvector.js index 86aefd750fa..8766089e89b 100644 --- a/jstests/core/splitvector.js +++ b/jstests/core/splitvector.js @@ -1,6 +1,7 @@ // Cannot implicitly shard accessed collections because the "splitVector" command cannot be run // on a sharded collection -// @tags: [assumes_unsharded_collection] +// +// @tags: [assumes_unsharded_collection, requires_fastcount, requires_collstats] // ------------------------- // SPLITVECTOR TEST UTILS diff --git a/jstests/core/stages_delete.js b/jstests/core/stages_delete.js index 46d7f316212..e7d32c268f7 100644 --- a/jstests/core/stages_delete.js +++ b/jstests/core/stages_delete.js @@ -3,6 +3,7 @@ // # specifying a writeConcern. // assumes_write_concern_unchanged, // does_not_support_stepdowns, +// requires_fastcount, // ] // Test basic delete stage functionality. diff --git a/jstests/core/startup_log.js b/jstests/core/startup_log.js index b869221e7dd..1bbbddfb222 100644 --- a/jstests/core/startup_log.js +++ b/jstests/core/startup_log.js @@ -3,7 +3,7 @@ * entry matching the server's response from the "getCmdLineOpts" command. The former operation may * be routed to a secondary in the replica set, whereas the latter must be routed to the primary. * - * @tags: [assumes_read_preference_unchanged] + * @tags: [assumes_read_preference_unchanged, requires_collstats] */ load('jstests/aggregation/extras/utils.js'); diff --git a/jstests/core/storefunc.js b/jstests/core/storefunc.js index 42caed6f861..44b27802565 100644 --- a/jstests/core/storefunc.js +++ b/jstests/core/storefunc.js @@ -2,6 +2,7 @@ // requires_eval_command, // requires_non_retryable_commands, // requires_non_retryable_writes, +// requires_fastcount, // ] // Use a private sister database to avoid conflicts with other tests that use system.js diff --git a/jstests/core/system_profile.js b/jstests/core/system_profile.js index 20919512be8..81ac34d12d2 100644 --- a/jstests/core/system_profile.js +++ b/jstests/core/system_profile.js @@ -1,5 +1,9 @@ -// @tags: [does_not_support_stepdowns, requires_non_retryable_commands, -// requires_non_retryable_writes] +// @tags: [ +// does_not_support_stepdowns, +// requires_non_retryable_commands, +// requires_non_retryable_writes, +// requires_collstats, +// ] // Test various user operations against "system.profile" collection. SERVER-18111. diff --git a/jstests/core/temp_cleanup.js b/jstests/core/temp_cleanup.js index 75b6952d824..f9e0432c890 100644 --- a/jstests/core/temp_cleanup.js +++ b/jstests/core/temp_cleanup.js @@ -1,4 +1,4 @@ -// @tags: [does_not_support_stepdowns] +// @tags: [does_not_support_stepdowns, requires_fastcount] mydb = db.getSisterDB("temp_cleanup_test"); diff --git a/jstests/core/testminmax.js b/jstests/core/testminmax.js index 5e874397a04..ea60191f3a9 100644 --- a/jstests/core/testminmax.js +++ b/jstests/core/testminmax.js @@ -1,3 +1,5 @@ +// @tags: [requires_fastcount] + t = db.minmaxtest; t.drop(); t.insert({ diff --git a/jstests/core/top.js b/jstests/core/top.js index 3d98f5a7b2d..df7671207f4 100644 --- a/jstests/core/top.js +++ b/jstests/core/top.js @@ -5,7 +5,7 @@ * former operation may be routed to a secondary in the replica set, whereas the latter must be * routed to the primary. * - * @tags: [assumes_read_preference_unchanged] + * @tags: [assumes_read_preference_unchanged, requires_fastcount] */ (function() { load("jstests/libs/stats.js"); diff --git a/jstests/core/type1.js b/jstests/core/type1.js index 78c5f9b033c..aae040dee90 100644 --- a/jstests/core/type1.js +++ b/jstests/core/type1.js @@ -1,3 +1,4 @@ +// @tags: [requires_fastcount] t = db.type1; t.drop(); diff --git a/jstests/core/uniqueness.js b/jstests/core/uniqueness.js index e67d19dcbe6..a1763061af8 100644 --- a/jstests/core/uniqueness.js +++ b/jstests/core/uniqueness.js @@ -1,6 +1,7 @@ // Cannot implicitly shard accessed collections because of not being able to create unique index // using hashed shard key pattern. -// @tags: [cannot_create_unique_index_when_using_hashed_shard_key] +// +// @tags: [cannot_create_unique_index_when_using_hashed_shard_key, requires_fastcount] var res; diff --git a/jstests/core/update5.js b/jstests/core/update5.js index e0fee23c7fe..7f41096889c 100644 --- a/jstests/core/update5.js +++ b/jstests/core/update5.js @@ -1,7 +1,8 @@ // Cannot implicitly shard accessed collections because of following errmsg: A single // update/delete on a sharded collection must contain an exact match on _id or contain the shard // key. -// @tags: [assumes_unsharded_collection] +// +// @tags: [assumes_unsharded_collection, requires_fastcount] t = db.update5; diff --git a/jstests/core/update_addToSet.js b/jstests/core/update_addToSet.js index 5ea3e7d0550..bcf5b752846 100644 --- a/jstests/core/update_addToSet.js +++ b/jstests/core/update_addToSet.js @@ -1,7 +1,8 @@ // Cannot implicitly shard accessed collections because of following errmsg: A single // update/delete on a sharded collection must contain an exact match on _id or contain the shard // key. -// @tags: [assumes_unsharded_collection] +// +// @tags: [assumes_unsharded_collection, requires_fastcount] t = db.update_addToSet1; t.drop(); diff --git a/jstests/core/update_arraymatch5.js b/jstests/core/update_arraymatch5.js index 16d215fe33b..f60f7816b99 100644 --- a/jstests/core/update_arraymatch5.js +++ b/jstests/core/update_arraymatch5.js @@ -1,4 +1,4 @@ -// @tags: [requires_non_retryable_writes] +// @tags: [requires_non_retryable_writes, requires_fastcount] t = db.update_arraymatch5; t.drop(); diff --git a/jstests/core/update_find_and_modify_id.js b/jstests/core/update_find_and_modify_id.js index ca565cb0e8c..f6fd646d087 100644 --- a/jstests/core/update_find_and_modify_id.js +++ b/jstests/core/update_find_and_modify_id.js @@ -1,5 +1,7 @@ // SERVER-4516 and SERVER-6913: test that update and findAndModify tolerate // an _id in the update document, as long as the _id will not be modified +// +// @tags: [requires_fastcount] var t = db.jstests_server4516; var startingDoc = {_id: 1, a: 1}; diff --git a/jstests/core/update_invalid1.js b/jstests/core/update_invalid1.js index 3fd96d61f38..df3a3e19b1a 100644 --- a/jstests/core/update_invalid1.js +++ b/jstests/core/update_invalid1.js @@ -1,3 +1,4 @@ +// @tags: [requires_fastcount] t = db.update_invalid1; t.drop(); diff --git a/jstests/core/updatel.js b/jstests/core/updatel.js index 6eebd35a150..ce5bd4d5dc7 100644 --- a/jstests/core/updatel.js +++ b/jstests/core/updatel.js @@ -1,4 +1,4 @@ -// @tags: [requires_non_retryable_writes] +// @tags: [requires_non_retryable_writes, requires_fastcount] // The positional operator allows an update modifier field path to contain a sentinel ('$') path // part that is replaced with the numeric position of an array element matched by the update's query diff --git a/jstests/core/upsert_shell.js b/jstests/core/upsert_shell.js index af275d9a7b6..8d390e0fe16 100644 --- a/jstests/core/upsert_shell.js +++ b/jstests/core/upsert_shell.js @@ -1,7 +1,7 @@ // Cannot implicitly shard accessed collections because of following errmsg: A single // update/delete on a sharded collection must contain an exact match on _id or contain the shard // key. -// @tags: [assumes_unsharded_collection] +// @tags: [assumes_unsharded_collection, requires_fastcount] // tests to make sure that the new _id is returned after the insert in the shell var l; diff --git a/jstests/core/useindexonobjgtlt.js b/jstests/core/useindexonobjgtlt.js index c790019af9e..4d2368f316f 100644 --- a/jstests/core/useindexonobjgtlt.js +++ b/jstests/core/useindexonobjgtlt.js @@ -1,10 +1,12 @@ -t = db.factories;
-t.drop();
-t.insert({name: "xyz", metro: {city: "New York", state: "NY"}});
-t.ensureIndex({metro: 1});
-
-assert(db.factories.find().count());
-
-assert.eq(1, db.factories.find({metro: {city: "New York", state: "NY"}}).hint({metro: 1}).count());
-
-assert.eq(1, db.factories.find({metro: {$gte: {city: "New York"}}}).hint({metro: 1}).count());
+// @tags: [requires_fastcount] + +t = db.factories; +t.drop(); +t.insert({name: "xyz", metro: {city: "New York", state: "NY"}}); +t.ensureIndex({metro: 1}); + +assert(db.factories.find().count()); + +assert.eq(1, db.factories.find({metro: {city: "New York", state: "NY"}}).hint({metro: 1}).count()); + +assert.eq(1, db.factories.find({metro: {$gte: {city: "New York"}}}).hint({metro: 1}).count());
\ No newline at end of file diff --git a/jstests/core/views/views_all_commands.js b/jstests/core/views/views_all_commands.js index bceae973973..6e045d9fccc 100644 --- a/jstests/core/views/views_all_commands.js +++ b/jstests/core/views/views_all_commands.js @@ -1,5 +1,10 @@ -// @tags: [does_not_support_stepdowns, requires_getmore, requires_non_retryable_commands, -// requires_non_retryable_writes] +// @tags: [ +// does_not_support_stepdowns, +// requires_getmore, +// requires_non_retryable_commands, +// requires_non_retryable_writes, +// requires_fastcount, +// ] /* * Declaratively-defined tests for views for all database commands. This file contains a map of test diff --git a/jstests/core/views/views_collation.js b/jstests/core/views/views_collation.js index e63f348d4f2..83f5be0a30b 100644 --- a/jstests/core/views/views_collation.js +++ b/jstests/core/views/views_collation.js @@ -1,4 +1,4 @@ -// @tags: [does_not_support_stepdowns, requires_non_retryable_commands] +// @tags: [does_not_support_stepdowns, requires_non_retryable_commands, requires_fastcount] /** * Tests the behavior of operations when interacting with a view's default collation. diff --git a/jstests/core/views/views_count.js b/jstests/core/views/views_count.js index 932021e899f..cfef3775569 100644 --- a/jstests/core/views/views_count.js +++ b/jstests/core/views/views_count.js @@ -1,4 +1,7 @@ // Test the count command with views. +// +// @tags: [requires_fastcount] + (function() { "use strict"; diff --git a/jstests/core/views/views_rename.js b/jstests/core/views/views_rename.js index 63a87a1d61d..2d6de5290d3 100644 --- a/jstests/core/views/views_rename.js +++ b/jstests/core/views/views_rename.js @@ -1,4 +1,4 @@ -// @tags: [requires_non_retryable_commands] +// @tags: [requires_non_retryable_commands, requires_fastcount] (function() { // SERVER-30406 Test that renaming system.views correctly invalidates the view catalog diff --git a/jstests/core/write_result.js b/jstests/core/write_result.js index 4eb1abed2d7..c81908b8a5a 100644 --- a/jstests/core/write_result.js +++ b/jstests/core/write_result.js @@ -6,6 +6,7 @@ // assumes_unsharded_collection, // assumes_write_concern_unchanged, // requires_non_retryable_writes, +// requires_fastcount // ] // |