Skip to content
Permalink
Browse files

SERVER-26315 Override DBCollection.prototype.drop to re-shard collect…

…ions that are dropped

in sharded cluster environments.
  • Loading branch information
Eddie Louie
Eddie Louie committed Mar 13, 2017
1 parent 9911c1a commit 56e66454d14e16689331672734ecde7644a41c78
Showing with 1,096 additions and 58 deletions.
  1. +8 −0 buildscripts/resmokeconfig/suites/aggregation_sharded_collections_passthrough.yml
  2. +8 −0 buildscripts/resmokeconfig/suites/sharded_collections_jscore_passthrough.yml
  3. +5 −0 jstests/aggregation/bugs/ifnull.js
  4. +5 −0 jstests/aggregation/bugs/server21632.js
  5. +4 −1 jstests/aggregation/bugs/server22093.js
  6. +4 −0 jstests/aggregation/bugs/server3253.js
  7. +4 −1 jstests/aggregation/bugs/server6192_server6193.js
  8. +3 −0 jstests/aggregation/expressions/collation_expressions.js
  9. +3 −0 jstests/aggregation/sources/bucket/collation_bucket.js
  10. +3 −0 jstests/aggregation/sources/bucketauto/collation_bucketauto.js
  11. +4 −0 jstests/aggregation/sources/facet/inner_graphlookup.js
  12. +4 −0 jstests/aggregation/sources/facet/inner_lookup.js
  13. +3 −0 jstests/aggregation/sources/geonear/collation_geonear.js
  14. +4 −0 jstests/aggregation/sources/graphLookup/airports.js
  15. +4 −0 jstests/aggregation/sources/graphLookup/basic.js
  16. +4 −0 jstests/aggregation/sources/graphLookup/collation_graphlookup.js
  17. +4 −0 jstests/aggregation/sources/graphLookup/error.js
  18. +4 −0 jstests/aggregation/sources/graphLookup/filter.js
  19. +4 −0 jstests/aggregation/sources/graphLookup/nested_objects.js
  20. +4 −0 jstests/aggregation/sources/graphLookup/socialite.js
  21. +3 −0 jstests/aggregation/sources/group/collation_group.js
  22. +3 −0 jstests/aggregation/sources/lookup/collation_lookup.js
  23. +3 −0 jstests/aggregation/sources/match/collation_match.js
  24. +3 −0 jstests/aggregation/sources/redact/collation_redact.js
  25. +4 −0 jstests/core/agg_hint.js
  26. +5 −0 jstests/core/and2.js
  27. +5 −0 jstests/core/autoid.js
  28. +5 −0 jstests/core/batch_write_collation_estsize.js
  29. +5 −0 jstests/core/batch_write_command_delete.js
  30. +4 −0 jstests/core/batch_write_command_insert.js
  31. +5 −0 jstests/core/batch_write_command_update.js
  32. +3 −0 jstests/core/bench_test1.js
  33. +4 −0 jstests/core/bulk_api_ordered.js
  34. +5 −0 jstests/core/bulk_api_unordered.js
  35. +4 −0 jstests/core/bulk_insert_capped.js
  36. +4 −0 jstests/core/collation.js
  37. +4 −0 jstests/core/collation_update.js
  38. +4 −0 jstests/core/collmod.js
  39. +4 −0 jstests/core/collmod_bad_spec.js
  40. +5 −0 jstests/core/commands_namespace_parsing.js
  41. +4 −0 jstests/core/count11.js
  42. +4 −0 jstests/core/coveredIndex1.js
  43. +5 −0 jstests/core/coveredIndex2.js
  44. +5 −0 jstests/core/covered_index_compound_1.js
  45. +5 −0 jstests/core/covered_index_simple_1.js
  46. +5 −0 jstests/core/covered_index_simple_2.js
  47. +5 −0 jstests/core/covered_index_simple_3.js
  48. +5 −0 jstests/core/covered_index_sort_1.js
  49. +5 −0 jstests/core/covered_index_sort_3.js
  50. +5 −0 jstests/core/covered_multikey.js
  51. +4 −0 jstests/core/create_collection.js
  52. +5 −0 jstests/core/crud_api.js
  53. +4 −0 jstests/core/datasize2.js
  54. +4 −0 jstests/core/doc_validation.js
  55. +4 −0 jstests/core/doc_validation_invalid_validators.js
  56. +4 −0 jstests/core/doc_validation_options.js
  57. +4 −0 jstests/core/drop.js
  58. +3 −0 jstests/core/drop_index.js
  59. +5 −0 jstests/core/ensure_sorted.js
  60. +3 −0 jstests/core/eval2.js
  61. +3 −0 jstests/core/eval3.js
  62. +3 −0 jstests/core/eval4.js
  63. +4 −0 jstests/core/eval_mr.js
  64. +4 −0 jstests/core/evald.js
  65. +4 −0 jstests/core/explain_agg_write_concern.js
  66. +4 −0 jstests/core/explain_distinct.js
  67. +4 −0 jstests/core/explain_find_and_modify.js
  68. +4 −0 jstests/core/explain_missing_collection.js
  69. +5 −0 jstests/core/explain_multi_plan.js
  70. +4 −0 jstests/core/explain_shell_helpers.js
  71. +5 −0 jstests/core/explain_upsert.js
  72. +13 −10 jstests/core/filemd5.js
  73. +5 −0 jstests/core/find_and_modify.js
  74. +5 −0 jstests/core/find_and_modify2.js
  75. +5 −0 jstests/core/find_and_modify3.js
  76. +5 −0 jstests/core/find_and_modify4.js
  77. +5 −0 jstests/core/find_and_modify_concurrent_update.js
  78. +5 −0 jstests/core/find_and_modify_empty_coll.js
  79. +5 −0 jstests/core/find_and_modify_empty_update.js
  80. +4 −0 jstests/core/find_and_modify_server6254.js
  81. +4 −0 jstests/core/find_and_modify_server6582.js
  82. +4 −0 jstests/core/find_and_modify_server6588.js
  83. +4 −0 jstests/core/find_and_modify_server6659.js
  84. +5 −0 jstests/core/find_and_modify_server6865.js
  85. +5 −0 jstests/core/find_and_modify_server6909.js
  86. +4 −0 jstests/core/find_and_modify_server6993.js
  87. +4 −0 jstests/core/find_and_modify_server7660.js
  88. +4 −0 jstests/core/find_and_modify_where.js
  89. +4 −0 jstests/core/fts1.js
  90. +4 −0 jstests/core/fts_blogwild.js
  91. +4 −0 jstests/core/fts_explain.js
  92. +4 −0 jstests/core/fts_index.js
  93. +4 −0 jstests/core/fts_index2.js
  94. +5 −0 jstests/core/fts_index3.js
  95. +3 −0 jstests/core/geo1.js
  96. +4 −0 jstests/core/geo10.js
  97. +3 −0 jstests/core/geo2.js
  98. +3 −0 jstests/core/geo3.js
  99. +3 −0 jstests/core/geo6.js
  100. +3 −0 jstests/core/geo9.js
  101. +4 −0 jstests/core/geo_array0.js
  102. +4 −0 jstests/core/geo_array2.js
  103. +4 −0 jstests/core/geo_borders.js
  104. +4 −0 jstests/core/geo_center_sphere2.js
  105. +4 −0 jstests/core/geo_distinct.js
  106. +4 −0 jstests/core/geo_exactfetch.js
  107. +4 −0 jstests/core/geo_group.js
  108. +4 −0 jstests/core/geo_max.js
  109. +4 −0 jstests/core/geo_mindistance.js
  110. +4 −0 jstests/core/geo_mindistance_boundaries.js
  111. +4 −0 jstests/core/geo_multinest0.js
  112. +4 −0 jstests/core/geo_multinest1.js
  113. +4 −0 jstests/core/geo_near_random1.js
  114. +4 −0 jstests/core/geo_near_random2.js
  115. +4 −0 jstests/core/geo_or.js
  116. +3 −0 jstests/core/geo_queryoptimizer.js
  117. +4 −0 jstests/core/geo_regex0.js
  118. +4 −0 jstests/core/geo_s2dedupnear.js
  119. +4 −0 jstests/core/geo_s2disjoint_holes.js
  120. +4 −0 jstests/core/geo_s2index.js
  121. +4 −0 jstests/core/geo_s2indexversion1.js
  122. +4 −0 jstests/core/geo_s2meridian.js
  123. +4 −0 jstests/core/geo_s2near.js
  124. +4 −0 jstests/core/geo_s2nearComplex.js
  125. +4 −0 jstests/core/geo_s2near_equator_opposite.js
  126. +4 −0 jstests/core/geo_s2nearcorrect.js
  127. +4 −0 jstests/core/geo_s2nongeoarray.js
  128. +4 −0 jstests/core/geo_s2nonstring.js
  129. +4 −0 jstests/core/geo_s2nopoints.js
  130. +4 −0 jstests/core/geo_small_large.js
  131. +3 −0 jstests/core/geo_sort1.js
  132. +4 −0 jstests/core/geo_uniqueDocs2.js
  133. +5 −0 jstests/core/geo_update.js
  134. +4 −0 jstests/core/geo_update_dedup.js
  135. +3 −0 jstests/core/geoa.js
  136. +3 −0 jstests/core/geoc.js
  137. +4 −0 jstests/core/geof.js
  138. +4 −0 jstests/core/getmore_cmd_maxtimems.js
  139. +5 −0 jstests/core/getmore_invalidation.js
  140. +4 −0 jstests/core/group1.js
  141. +4 −0 jstests/core/group2.js
  142. +4 −0 jstests/core/group3.js
  143. +3 −0 jstests/core/group4.js
  144. +3 −0 jstests/core/group5.js
  145. +4 −0 jstests/core/group6.js
  146. +4 −0 jstests/core/group8.js
  147. +4 −0 jstests/core/group9.js
  148. +4 −0 jstests/core/hashindex1.js
  149. +3 −0 jstests/core/in5.js
  150. +5 −0 jstests/core/inc-SERVER-7446.js
  151. +4 −0 jstests/core/inc3.js
  152. +3 −1 jstests/core/index3.js
  153. +4 −0 jstests/core/index4.js
  154. +4 −0 jstests/core/index8.js
  155. +4 −0 jstests/core/index9.js
  156. +4 −0 jstests/core/index_arr1.js
  157. +4 −0 jstests/core/index_big1.js
  158. +3 −0 jstests/core/index_bigkeys.js
  159. +5 −0 jstests/core/index_decimal.js
  160. +4 −0 jstests/core/index_dropdups_ignore.js
  161. +4 −0 jstests/core/index_filter_commands.js
  162. +4 −0 jstests/core/index_id_options.js
  163. +4 −0 jstests/core/index_many.js
  164. +3 −0 jstests/core/index_many2.js
  165. +4 −0 jstests/core/index_multiple_compatibility.js
  166. +4 −0 jstests/core/index_partial_create_drop.js
  167. +4 −0 jstests/core/index_partial_read_ops.js
  168. +3 −0 jstests/core/index_sparse1.js
  169. +4 −0 jstests/core/index_sparse2.js
  170. +5 −0 jstests/core/index_stats.js
  171. +5 −0 jstests/core/index_type_change.js
  172. +4 −0 jstests/core/indexa.js
  173. +3 −0 jstests/core/indexapi.js
  174. +4 −0 jstests/core/indexb.js
  175. +4 −0 jstests/core/indexes_multiple_commands.js
  176. +4 −0 jstests/core/insert2.js
  177. +4 −0 jstests/core/insert_id_undefined.js
  178. +3 −0 jstests/core/js3.js
  179. +4 −0 jstests/core/js9.js
  180. +4 −0 jstests/core/list_collections1.js
  181. +4 −0 jstests/core/list_indexes.js
  182. +36 −32 jstests/core/list_indexes_invalid.js
  183. +4 −0 jstests/core/list_indexes_invalidation.js
  184. +3 −1 jstests/core/mr2.js
  185. +4 −0 jstests/core/mr_bigobject_replace.js
  186. +3 −0 jstests/core/mr_errorhandling.js
  187. +5 −0 jstests/core/mr_killop.js
  188. +3 −0 jstests/core/mr_merge.js
  189. +3 −0 jstests/core/mr_merge2.js
  190. +3 −0 jstests/core/mr_outreduce.js
  191. +3 −0 jstests/core/mr_outreduce2.js
  192. +3 −0 jstests/core/mr_sort.js
  193. +4 −0 jstests/core/multikey_geonear.js
  194. +4 −0 jstests/core/or4.js
  195. +4 −0 jstests/core/projection_dotted_paths.js
  196. +5 −0 jstests/core/pull.js
  197. +4 −0 jstests/core/pull2.js
  198. +4 −0 jstests/core/pull_or.js
  199. +4 −0 jstests/core/pull_remove1.js
  200. +5 −0 jstests/core/pullall.js
  201. +4 −0 jstests/core/pullall2.js
  202. +5 −0 jstests/core/pushall.js
  203. +3 −0 jstests/core/remove8.js
  204. +4 −0 jstests/core/remove_justone.js
  205. +5 −0 jstests/core/return_key.js
  206. +4 −0 jstests/core/server1470.js
  207. +4 −0 jstests/core/set3.js
  208. +4 −0 jstests/core/set4.js
  209. +4 −0 jstests/core/set5.js
  210. +4 −0 jstests/core/set6.js
  211. +5 −0 jstests/core/set7.js
  212. +5 −0 jstests/core/set_type_change.js
  213. +5 −0 jstests/core/shell_writeconcern.js
  214. +4 −0 jstests/core/sortg.js
  215. +4 −0 jstests/core/splitvector.js
  216. +4 −0 jstests/core/uniqueness.js
  217. +5 −0 jstests/core/unset2.js
  218. +5 −0 jstests/core/update2.js
  219. +5 −0 jstests/core/update3.js
  220. +4 −0 jstests/core/update5.js
  221. +4 −0 jstests/core/update6.js
  222. +4 −0 jstests/core/update7.js
  223. +4 −0 jstests/core/update_addToSet.js
  224. +4 −0 jstests/core/update_arraymatch1.js
  225. +4 −0 jstests/core/update_arraymatch4.js
  226. +5 −0 jstests/core/update_arraymatch6.js
  227. +5 −0 jstests/core/update_arraymatch7.js
  228. +5 −0 jstests/core/update_arraymatch8.js
  229. +5 −0 jstests/core/update_bit_examples.js
  230. +4 −0 jstests/core/update_blank1.js
  231. +5 −0 jstests/core/update_currentdate_examples.js
  232. +5 −0 jstests/core/update_dbref.js
  233. +5 −0 jstests/core/update_mul_examples.js
  234. +4 −0 jstests/core/updatea.js
  235. +4 −0 jstests/core/updateb.js
  236. +4 −0 jstests/core/updated.js
  237. +5 −0 jstests/core/updatee.js
  238. +5 −0 jstests/core/updateg.js
  239. +5 −0 jstests/core/updateh.js
  240. +5 −0 jstests/core/updatei.js
  241. +5 −0 jstests/core/updatek.js
  242. +5 −0 jstests/core/updatem.js
  243. +5 −0 jstests/core/upsert_and.js
  244. +5 −0 jstests/core/upsert_fields.js
  245. +5 −0 jstests/core/upsert_shell.js
  246. +5 −0 jstests/core/verify_update_mods.js
  247. +5 −0 jstests/core/write_result.js
  248. +32 −12 jstests/libs/override_methods/implicitly_shard_accessed_collections.js
@@ -24,6 +24,14 @@ selector:
- jstests/aggregation/bugs/cursor_timeout.js
- jstests/aggregation/bugs/lookup_unwind_getmore.js
- jstests/aggregation/bugs/lookup_unwind_killcursor.js
# TODO: Remove after SERVER-23229 is fixed.
- jstests/aggregation/bugs/groupMissing.js
exclude_with_any_tags:
# Tests tagged with the following will fail because they assume collections are not sharded.
- assumes_no_implicit_collection_creation_after_drop
- assumes_no_implicit_index_creation
- assumes_unsharded_collection
- cannot_create_unique_index_when_using_hashed_shard_key

executor:
js_test:
@@ -70,6 +70,14 @@ selector:
- jstests/core/batch_write_command_delete.js
- jstests/core/batch_write_command_insert.js
- jstests/core/batch_write_command_update.js
# TODO: Remove after fixing SERVER-28321.
- jstests/core/mr_undef.js
exclude_with_any_tags:
# Tests tagged with the following will fail because they assume collections are not sharded.
- assumes_no_implicit_collection_creation_after_drop
- assumes_no_implicit_index_creation
- assumes_unsharded_collection
- cannot_create_unique_index_when_using_hashed_shard_key

executor:
js_test:
@@ -1,3 +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]

// $ifNull returns the result of the first expression if not null or undefined, otherwise of the
// second expression.
load('jstests/aggregation/extras/utils.js');
@@ -1,3 +1,7 @@
// Cannot implicitly shard accessed collections because the coll.stats() 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]

// This test is designed to stress $sample, and any optimizations a storage engine might provide.
//
// A $sample stage as the first stage in a pipeline should ideally have a uniform distribution, so
@@ -26,6 +30,7 @@
// as a supported file type. (See: WT-2403 for details on forthcoming changes)

var storageEngine = jsTest.options().storageEngine || "wiredTiger";

if (storageEngine == "wiredTiger" && coll.stats().wiredTiger.type == 'lsm') {
return;
}
@@ -2,9 +2,12 @@
// from the input documents will tell the query planner to use a count scan, which is faster than an
// index scan. In this test file, we check this behavior through explain().
//
// 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.
//
// This test assumes that an initial $match will be absorbed by the query system, which will not
// happen if the $match is wrapped within a $facet stage.
// @tags: [do_not_wrap_aggregations_in_facets]
// @tags: [do_not_wrap_aggregations_in_facets,assumes_unsharded_collection]
load('jstests/libs/analyze_plan.js');

(function() {
@@ -1,3 +1,7 @@
// Cannot implicitly shard accessed collections because unsupported use of sharded collection
// for output collection of aggregation pipeline.
// @tags: [assumes_unsharded_collection]

// server-3253 Unsharded support for $out
load('jstests/aggregation/extras/utils.js');

@@ -1,9 +1,12 @@
// test short-circuiting of $and and $or in
// $project stages to a $const boolean
//
// 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.
//
// This test makes assumptions about how the explain output will be formatted, so cannot be
// transformed to be put inside a $facet stage.
// @tags: [do_not_wrap_aggregations_in_facets]
// @tags: [do_not_wrap_aggregations_in_facets,assumes_unsharded_collection]

var t = db.jstests_aggregation_server6192;
t.drop();
@@ -1,3 +1,6 @@
// Cannot implicitly shard accessed collections because of collection existing when none expected.
// @tags: [assumes_no_implicit_collection_creation_after_drop]

// Test that expressions which make can make string comparisons respect the collation.
(function() {
"use strict";
@@ -1,3 +1,6 @@
// Cannot implicitly shard accessed collections because of collection existing when none expected.
// @tags: [assumes_no_implicit_collection_creation_after_drop]

// Test that the $bucket stage defines and sorts buckets according to the collation.
(function() {
"use strict";
@@ -1,3 +1,6 @@
// Cannot implicitly shard accessed collections because of collection existing when none expected.
// @tags: [assumes_no_implicit_collection_creation_after_drop]

// Test that the $bucketAuto stage defines and sorts buckets according to the collation.
(function() {
"use strict";
@@ -1,3 +1,7 @@
// Cannot implicitly shard accessed collections because unsupported use of sharded collection
// for target collection of $lookup and $graphLookup.
// @tags: [assumes_unsharded_collection]

/**
* Tests that using a $graphLookup stage inside of a $facet stage will yield the same results as
* using the $graphLookup stage outside of the $facet stage.
@@ -1,3 +1,7 @@
// Cannot implicitly shard accessed collections because unsupported use of sharded collection
// for target collection of $lookup and $graphLookup.
// @tags: [assumes_unsharded_collection]

/**
* Tests that using a $lookup stage inside of a $facet stage will yield the same results as using
* the $lookup stage outside of the $facet stage.
@@ -1,3 +1,6 @@
// Cannot implicitly shard accessed collections because of collection existing when none expected.
// @tags: [assumes_no_implicit_collection_creation_after_drop]

// Test that the $geoNear stage's query predicate respects the collation.
(function() {
"use strict";
@@ -1,3 +1,7 @@
// Cannot implicitly shard accessed collections because unsupported use of sharded collection
// for target collection of $lookup and $graphLookup.
// @tags: [assumes_unsharded_collection]

// In MongoDB 3.4, $graphLookup was introduced. In this file, we test some complex graphs.

(function() {
@@ -1,3 +1,7 @@
// Cannot implicitly shard accessed collections because unsupported use of sharded collection
// for target collection of $lookup and $graphLookup.
// @tags: [assumes_unsharded_collection]

// In MongoDB 3.4, $graphLookup was introduced. In this file, we test basic behavior and correctness
// of the stage.

@@ -1,3 +1,7 @@
// Cannot implicitly shard accessed collections because unsupported use of sharded collection
// for target collection of $lookup and $graphLookup.
// @tags: [assumes_unsharded_collection]

/**
* Tests that the $graphLookup stage respects the collation when matching between the
* 'connectFromField' and the 'connectToField'. $graphLookup should use the collation
@@ -1,3 +1,7 @@
// Cannot implicitly shard accessed collections because unsupported use of sharded collection
// for target collection of $lookup and $graphLookup.
// @tags: [assumes_unsharded_collection]

// In MongoDB 3.4, $graphLookup was introduced. In this file, we test the error cases.
load("jstests/aggregation/extras/utils.js"); // For "assertErrorCode".

@@ -1,3 +1,7 @@
// Cannot implicitly shard accessed collections because unsupported use of sharded collection
// for target collection of $lookup and $graphLookup.
// @tags: [assumes_unsharded_collection]

// In SERVER-24714, the 'restrictSearchWithMatch' option was added to $graphLookup. In this file,
// we test the functionality and correctness of the option.

@@ -1,3 +1,7 @@
// Cannot implicitly shard accessed collections because unsupported use of sharded collection
// for target collection of $lookup and $graphLookup.
// @tags: [assumes_unsharded_collection]

// In MongoDB 3.4, $graphLookup was introduced. In this file, we test the behavior of graphLookup
// when the 'connectToField' is a nested array, or when the 'connectFromField' is a nested array.

@@ -1,3 +1,7 @@
// Cannot implicitly shard accessed collections because unsupported use of sharded collection
// for target collection of $lookup and $graphLookup.
// @tags: [assumes_unsharded_collection]

// In MongoDB 3.4, $graphLookup was introduced. In this file, we test $graphLookup as applied to the
// Socialite schema example available here: https://github.com/mongodb-labs/socialite

@@ -1,3 +1,6 @@
// Cannot implicitly shard accessed collections because of collection existing when none expected.
// @tags: [assumes_no_implicit_collection_creation_after_drop]

// Test that the $group stage and all accumulators respect the collation.
(function() {
"use strict";
@@ -1,3 +1,6 @@
// Cannot implicitly shard accessed collections because of collection existing when none expected.
// @tags: [assumes_no_implicit_collection_creation_after_drop]

/**
* Tests that the $lookup stage respects the collation.
*
@@ -1,3 +1,6 @@
// Cannot implicitly shard accessed collections because of collection existing when none expected.
// @tags: [assumes_no_implicit_collection_creation_after_drop]

// Test that the $match stage respects the collation.
(function() {
"use strict";
@@ -1,3 +1,6 @@
// Cannot implicitly shard accessed collections because of collection existing when none expected.
// @tags: [assumes_no_implicit_collection_creation_after_drop]

// Test that the $redact stage respects the collation.
(function() {
"use strict";
@@ -1,3 +1,7 @@
// Cannot implicitly shard accessed collections because of collection existing when none
// expected.
// @tags: [assumes_no_implicit_collection_creation_after_drop]

// Confirms correct behavior for hinted aggregation execution. This includes tests for scenarios
// where agg execution differs from query. It also includes confirmation that hint works for find
// command against views, which is converted to a hinted aggregation on execution.
@@ -1,3 +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]

// Test dollar sign operator with $and SERVER-1089

t = db.jstests_and2;
@@ -1,3 +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]

f = db.jstests_autoid;
f.drop();

@@ -1,3 +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]

// Tests that the update and delete batch write operations account for the size of the collation
// specification in the write operation document.

@@ -1,3 +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]

//
// Ensures that mongod respects the batch write protocols for delete
//
@@ -1,3 +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]

//
// Ensures that mongod respects the batch write protocol for inserts
//
@@ -1,3 +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]

//
// Ensures that mongod respects the batch write protocols for updates
//
@@ -1,3 +1,6 @@
// Cannot implicitly shard accessed collections because of extra shard key index in sharded
// collection.
// @tags: [assumes_no_implicit_index_creation]

t = db.bench_test1;
t.drop();
@@ -1,3 +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]

var collectionName = "bulk_api_ordered";
var coll = db.getCollection(collectionName);
@@ -1,3 +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]

var collectionName = "bulk_api_unordered";
var coll = db.getCollection(collectionName);
coll.drop();
@@ -1,3 +1,7 @@
// Cannot implicitly shard accessed collections because of collection existing when none
// expected.
// @tags: [assumes_no_implicit_collection_creation_after_drop]

// SERVER-21488 Test that multi inserts into capped collections don't cause corruption.
// Note: this file must have a name that starts with "bulk" so it gets run by bulk_gle_passthrough.
(function() {
@@ -1,3 +1,7 @@
// Cannot implicitly shard accessed collections because of collection existing when none
// expected.
// @tags: [assumes_no_implicit_collection_creation_after_drop]

// Integration tests for the collation feature.
(function() {
'use strict';
@@ -1,3 +1,7 @@
// Cannot implicitly shard accessed collections because of collection existing when none
// expected.
// @tags: [assumes_no_implicit_collection_creation_after_drop]

// Integration tests for collation-aware updates.
(function() {
'use strict';
@@ -1,3 +1,7 @@
// Cannot implicitly shard accessed collections because of collection existing when none
// expected.
// @tags: [assumes_no_implicit_collection_creation_after_drop]

// Basic js tests for the collMod command.
// Test setting the usePowerOf2Sizes flag, and modifying TTL indexes.

@@ -1,3 +1,7 @@
// Cannot implicitly shard accessed collections because of collection existing when none
// expected.
// @tags: [assumes_no_implicit_collection_creation_after_drop]

// This is a regression test for SERVER-21545.
//
// Tests that a collMod with a bad specification does not cause any changes, and does not crash the
@@ -1,3 +1,8 @@
// 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]

// 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
// function, regardless of the namespace used in the command object.
@@ -1,3 +1,7 @@
// Cannot implicitly shard accessed collections because of collection existing when none
// expected.
// @tags: [assumes_no_implicit_collection_creation_after_drop]

// 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.

@@ -1,3 +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]

t = db["jstests_coveredIndex1"];
t.drop();
@@ -1,3 +1,8 @@
// 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]

t = db["jstests_coveredIndex2"];
t.drop();

@@ -1,3 +1,8 @@
// 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]

// Compound index covered query tests

// Include helpers for analyzing explain output.
@@ -1,3 +1,8 @@
// 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]

// Simple covered index query test

// Include helpers for analyzing explain output.

0 comments on commit 56e6645

Please sign in to comment.
You can’t perform that action at this time.