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

Executing a read concern query after connecting with the shell throws error

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Duplicate
    • 3.2.1
    • None
    • Shell
    • None
    • ALL
    • Hide

      start new replicaset with --enableMajorityReadConcern
      connect to shell
      execute db.blah.find({}).readConcern("majority") twice

      Show
      start new replicaset with --enableMajorityReadConcern connect to shell execute db.blah.find({}).readConcern("majority") twice

    Description

      This behavior was introduced in MongoDB shell version 3.2.1

      If the first command after connecting with the shell is a read concern query, the shell throws Error: readConcern requires use of read commands.

      Subsequent queries complete successfully.

      MongoDB shell version: 3.2.1
      connecting to: test
      Server has startup warnings: 
      2016-01-22T15:45:26.193-0500 I CONTROL  [initandlisten] 
      2016-01-22T15:45:26.193-0500 I CONTROL  [initandlisten] ** WARNING: soft rlimits too low. Number of files is 256, should be at least 1000
      replset:PRIMARY> db.blah.find({}).readConcern("majority")
      Error: readConcern requires use of read commands
      replset:PRIMARY> db.blah.find({}).readConcern("majority")
      replset:PRIMARY> 
      

      Attachments

        Issue Links

          Activity

            People

              david.storch@mongodb.com David Storch
              kelsey.schubert@mongodb.com Kelsey T Schubert
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: