Uploaded image for project: 'Python Driver'
  1. Python Driver
  2. PYTHON-1069

command not listening to writeconcern

    • Type: Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Priority: Icon: Critical - P2 Critical - P2
    • None
    • Affects Version/s: None
    • Component/s: None
    • None

      i'm connecting to a sharded cluster, without setting any of the w, wtimeout or j parameters. I've tried running an update command which alters a single document in the following ways:

      from pymongo.write_concern import WriteConcern
      dc1 = db.col.with_options(write_concern=WriteConcern(w=0))
      
      db.col.update({"_id":"x"},{..}, w=0)
      dc1.update({"_id":"x"},{..}, w=0)
      dc1.update_one({"_id":"x"},{..})
      

      but in the logs, i can see the exact command running with

      writeConcern: { w: 1 }
      

      The update is an increase on a field, and whenever there is a lot of activity and many workers try to increase that field they tangle eachother, and the command takes a lot to execute. I've assumed it was because of the writeconcern, and i've been assuming that disabling the write concern would make it faster, but it doesn't work.

            Assignee:
            bernie@mongodb.com Bernie Hackett
            Reporter:
            thestick613 Tudor Aursulesei
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: