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

    • Type: Icon: Bug Bug
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Replication, Write Ops
    • None
    • Replication
    • v3.2
    • Repl 2017-01-23
    • 0

      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 } } )
      

            Assignee:
            backlog-server-repl [DO NOT USE] Backlog - Replication Team
            Reporter:
            kay.kim@mongodb.com Kay Kim (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved: