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

Unable to create a new collection on a sharded cluster when using versioned API with strict=True

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Sharding EMEA
    • ALL

      The purpose of this template is to ensure that we have all of the necessary information about the issue in a consistent and clear form. Please fill out all the fields and replace the italicized text, as applicable.

      Links

      Link to Cluster

      Link if Atlas or Cloud monitoring cluster

      Links to FTDC & MongoDB logs

      Links to other useful data (gdb, perf, messages log, etc.)

      Status

      MongoDB Version and Architecture

      Issue Description

      What is the user seeing?

      Issuing the create command fails on MongoDB 5.0 with PyMongo 3.12:

      client = MongoClient(uri, server_api=ServerApi("1", strict=True))
      client.db.create_collection('new')
      pymongo.errors.OperationFailure: Database db could not be created :: caused by :: Provided apiStrict:true, but the command _configsvrCreateDatabase is not in API Version 1. Information on supported commands and migrations in API Version 1 can be found at https://dochub.mongodb.org/core/manual-versioned-api, full error: {'ok': 0.0, 'errmsg': 'Database db could not be created :: caused by :: Provided apiStrict:true, but the command _configsvrCreateDatabase is not in API Version 1. Information on supported commands and migrations in API Version 1 can be found at https://dochub.mongodb.org/core/manual-versioned-api', 'code': 323, 'codeName': 'APIStrictError'

      Where is it happening

      PyMongo 3.12, MongoDB 5.0 (Topology - sharded)

      db version v5.0.0
      Build Info: {
          "version": "5.0.0",
          "gitVersion": "1184f004a99660de6f5e745573419bda8a28c0e9",
          "openSSLVersion": "OpenSSL 1.0.2k-fips  26 Jan 2017",
          "modules": [
              "enterprise"
          ],
          "allocator": "tcmalloc",
          "environment": {
              "distmod": "amzn64",
              "distarch": "x86_64",
              "target_arch": "x86_64"
          }
      }

      When is it happening (timeline of events)

      For example: continuously? during certain time periods? at these particular points in time? what timestamps, specifically (including timezone)? Include all significant events in this timeline. Please use unambigous timestamps, including timezones. Example:
      2021-01-01T00:00:00Z slow queries and high latency begin
      2021-01-01T01:00:00Z failover from old primary node1 to new primary node2
      2021-01-01T02:00:00Z crash due to OOM
      2021-01-01T03:00:00Z upgrade to 4.4, cluster healthy again

      How much/many/long

      For example: how long are the slow queries? How low is the throughput? Single crash or repeated? How much lag?

      Diagnostics and Hypotheses

      Diagnostics

      Show FTDC, logs, etc. that you have looked at

      Hypotheses

      Questions for the Server Team

      • Include high priority questions first, please indicate if any of your questions are time sensitive.

            Assignee:
            backlog-server-sharding-emea [DO NOT USE] Backlog - Sharding EMEA
            Reporter:
            prashant.mital Prashant Mital (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved: