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

3.7 sharded clusters ignore create command write concern

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Works as Designed
    • Affects Version/s: 3.7.3
    • Fix Version/s: None
    • Component/s: Sharding
    • Labels:
      None
    • Operating System:
      ALL

      Description

      Sending the create command with a nonsensical write concern to a 3.7 replica set with three members results in a write concern error:

      >>> c = pymongo.MongoClient()
      >>> c.foo.command('create', 'bar', writeConcern={'w': 1000})
      {'ok': 1.0, 'operationTime': Timestamp(1518570804, 1), 'writeConcernError': {'codeName': 'CannotSatisfyWriteConcern', 'errmsg': 'Not enough data-bearing nodes', 'code': 100}, '$clusterTime': {'signature': {'keyId': 0, 'hash': b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'}, 'clusterTime': Timestamp(1518570804, 1)}}
      >>> c.admin.command('buildInfo')['version']
      '3.7.1-370-gfab8bda846'
      

      Sending the same command to a mongos in front of a single three member shard does not cause a write concern error:

      >>> c = pymongo.MongoClient()
      >>> c.foo.command('create', 'bar', writeConcern={'w': 1000})
      {'ok': 1.0, '$clusterTime': {'signature': {'keyId': 0, 'hash': b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'}, 'clusterTime': Timestamp(1518571939, 3)}, 'operationTime': Timestamp(1518571939, 2)}
      >>> c.admin.command('buildInfo')['version']
      '3.7.1-370-gfab8bda846'
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              renctan Randolph Tan
              Reporter:
              behackett Bernie Hackett
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: