Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-95788

Implicitly sharded collection passthrough suites should exclude capped collection tests

    • Type: Icon: Engineering Test Engineering Test
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 5.0.0, 6.0.0, 7.0.0, 8.1.0-rc0, 8.0.0
    • Component/s: None
    • None
    • Catalog and Routing
    • 1

      Summary

      Capped collections can not be sharded. However, currently some suites that include the implicitly_shard_accessed_collections.js override do not exclude tests marked with the requires_capped tag. This makes tests using capped collections and correctly tagged as requires_capped to fail under those suites, unless additional tags such as assumes_unsharded_collection are also added.

      Example

      For example, the following simple test fails when executed under the fcv_upgrade_downgrade_sharded_collections_jscore_passthrough suite, as the suite does not exclude the requires_capped tag:

      /**
       * @tags: [requires_capped]
       */
      
      assert.commandWorked(db.createCollection("collection_capped", {
          capped: true,
          size: 1024,
      }));
      db.collection_capped.insertOne({a: 1});
      

      Note however that some related suites such as sharded_collections_jscore_passthrough do in fact exclude the requires_capped tag.

      Proposed solution

      It would be sensible that all suites that include the implicitly_shard_accessed_collections.js override consistently exclude the requires_capped flag.

      The way those suites deal with capped collections now is through manual excludes (example) and additional tags (example). Those can be removed once the requires_capped tag is enough to exclude them.

      Additionally, some tests marked as requires_capped are able to complete successfully when running under implicitly sharded collection passthrough suites (for example, jstests/core/ddl/collation_convert_to_capped.js currently finishes successfully under the fcv_upgrade_downgrade_sharded_collections_jscore_passthrough suite). We should confirm that those tests are safe to exclude as they do not add additional coverage under those suites.

            Assignee:
            Unassigned Unassigned
            Reporter:
            joan.mico@mongodb.com Joan Bruguera Micó (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: