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

WriteConcern format for _secondaryThrottle is incorrect

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • Server_Docs_20231030
    • 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

        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:
              5 years, 26 weeks, 5 days ago