Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-11936

WriteConcern format for _secondaryThrottle is incorrect

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • None
    • Server
    • None

    Description

      ----------------------------

      Original Description

      Here in the documentation we have the following example:

      use config
      db.settings.update(
         { "_id" : "balancer" },
         { $set : { "_secondaryThrottle" : true ,
                    "writeConcern": { "w": "majority" } } },
         { upsert : true }
      )
      

      This is in fact incorrect - write concern, if set that way, will not take effect. The correct way to set it is:

      use config
      db.settings.update(
         { "_id" : "balancer" },
         { $set : { "_secondaryThrottle" : { "w": "majority" } } },
         { upsert : true }
      )
      

      So the resulting document would look like:

      MongoDB Enterprise mongos> db.getSiblingDB("config").settings.findOne()
      {
      	"_id" : "balancer",
      	"stopped" : false,
      	"mode" : "full",
      	"_secondaryThrottle" : {
      		"w" : "majority"
      	}
      }
      

      ----------------------------

      Description

      Scope of changes (files that need work and how much)

      Impact to other docs outside of this product

      MVP (work and date?)

      Resources (e.g. Scope Docs, Invision)

      Attachments

        Issue Links

          Activity

            People

              kay.kim@mongodb.com Kay Kim (Inactive)
              dmitry.ryabtsev@mongodb.com Dmitry Ryabtsev
              Votes:
              2 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                3 years, 46 weeks, 4 days ago