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

Inconsistent behavior between 3.2.6-rc0 and 3.3.5 for writeconcern majority and journaling

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Replication, Write Ops
    • Labels:
      None

      Description

      So, if I start primary with journaling and secondaries with no journaling:

      ./mongodb-3.2.6-rc0-enterprise/bin/mongod --replSet replset --dbpath /Users/kay/mongo/data/mongodb-3.2.6-rc0-enterprise/replset/rs1/db --logpath /Users/kay/mongo/data/mongodb-3.2.6-rc0-enterprise/replset/rs1/mongod.log --port 27017 --logappend --fork 
      ./mongodb-3.2.6-rc0-enterprise/bin/mongod --replSet replset --dbpath /Users/kay/mongo/data/mongodb-3.2.6-rc0-enterprise/replset/rs2/db --logpath /Users/kay/mongo/data/mongodb-3.2.6-rc0-enterprise/replset/rs2/mongod.log --port 27018 --logappend --fork --nojournal 
      ./mongodb-3.2.6-rc0-enterprise/bin/mongod --replSet replset --dbpath /Users/kay/mongo/data/mongodb-3.2.6-rc0-enterprise/replset/rs3/db --logpath /Users/kay/mongo/data/mongodb-3.2.6-rc0-enterprise/replset/rs3/mongod.log --port 27019 --logappend --fork --nojournal  
      
      

      Then after initiating the replica set and adding members,

      MongoDB Enterprise replset:PRIMARY> db.foo.insert( { x: 1 }, { writeConcern: { w: "majority" } } )
      WriteResult({ "nInserted" : 1 })
      MongoDB Enterprise replset:PRIMARY> db.foo.insert( { x: 1 }, { writeConcern: { w: "majority", j: true } } )
      WriteResult({ "nInserted" : 1 })
      

      But, using 3.3.5 version

      ./mongodb-3.3.5/bin/mongod --replSet replset --dbpath /Users/kay/mongo/data/mongodb-3.3.5/replset/rs1/db --logpath /Users/kay/mongo/data/mongodb-3.3.5/replset/rs1/mongod.log --port 27017 --logappend --fork 
      ./mongodb-3.3.5/bin/mongod --replSet replset --dbpath /Users/kay/mongo/data/mongodb-3.3.5/replset/rs2/db --logpath /Users/kay/mongo/data/mongodb-3.3.5/replset/rs2/mongod.log --port 27018 --logappend --fork --nojournal
      ./mongodb-3.3.5/bin/mongod --replSet replset --dbpath /Users/kay/mongo/data/mongodb-3.3.5/replset/rs3/db --logpath /Users/kay/mongo/data/mongodb-3.3.5/replset/rs3/mongod.log --port 27019 --logappend --fork --nojournal 
      
      

      The operation hangs because secondaries do not have journaling

      replset:PRIMARY>  db.foo.insert( { x: 1 }, { writeConcern: { w: "majority" } } )
      replset:PRIMARY> db.foo.insert( { x: 1 }, { writeConcern: { w: "majority" , j: true } } )
      

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                10 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: