Uploaded image for project: 'MongoDB Shell'
  1. MongoDB Shell
  2. MONGOSH-1357

MongoServerError: BSON field 'mirrorReads.samplingRate' is the wrong type 'int', expected type 'double'

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • 1.6.2
    • Affects Version/s: None
    • Component/s: Shell API
    • None
    • Environment:
      mongos 1.6
    • Not Needed

      hello, because there is a issue at 4.4.11+ version,

      +https://jira.mongodb.org/browse/SERVER-72532+ 

      I want to disable the mirrors reads feature, so I run the following command using mongosh 1.6: 

      db.adminCommand( {
        setParameter: 1,
        mirrorReads: { samplingRate: 0.0 }
      } )

      but, I got an exception:

      MongoServerError: BSON field 'mirrorReads.samplingRate' is the wrong type 'int', expected type 'double'  

      the same command that I run using mongo got successful result. I think this is a mongosh 's bug. Can anyone help to fix it ?

            Assignee:
            Unassigned Unassigned
            Reporter:
            335612970@qq.com dongyu si
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: