When using pymongo (since 2.4), when doing this :
m = pymongo.MongoClient()
m.write_concern = {'w': 2}
m.write_concern['j'] = True
We specify that we want acknowledged (on 2 replicas) and journaled write.
If we mention nothing in the write concern it sounds like w = 1 by default according to this post. But what is the deault mode for journaling when we specify nothing, is it j= True or False ?
The
j
option isFalse
by default. With journaling disabled on themongod
, inserting a document with default settings succeeds. Ifj
wasTrue
by default it would have raised an exception.