Enabling writeConcern

36 views
Skip to first unread message

revit

unread,
Sep 14, 2016, 10:32:11 AM9/14/16
to mongodb-dev
In order to enable fully durability for one document insertion I have applied the following:
1) ran mongod with the following journaling enabled (I am using wiredTiger engine)
storage:
   journal:
     enabled: true
2) I am running the following command on the client:
db.col1.insert({ "lolo144662" :22},{j:1})

To check that journaling does applied after the operation I entered a breakpoint in mongo::waitForWriteConcern function
but I saw that mongo::WriteConcernOptions::NONE. I appropriate help with that. Thanks,

Dwight Merriman

unread,
Oct 5, 2016, 11:19:19 PM10/5/16
to mongodb-dev
it's hard to give a full answer without knowing the version you are running on and the client api as these have evolved.  see doc link below and you can look at newer and older doc versions as appropriate.

write concern is about replica set semantics, primarily.  'j' is about local server the client is talking to.  in v3.2+, w:majority should be sufficient as it implies j:true.

https://docs.mongodb.com/manual/reference/write-concern/
Reply all
Reply to author
Forward
0 new messages