I am a bit confused about the sequence of mongod journal operation with
respect to write concern values.
As per my understanding journal write happens first in private view and
then the shared data view gets updated.
- In MMAPv1, setting a write operation with w:1, j:true alters the
journaling interval to 1/3 of its value (this is 100 ms by default if the
journal and the data files are located within the same block device).
Therefore, if you specify write concern of w:1, j:true, the journal
commit interval will be approximately 33 ms.
- In WiredTiger, setting a write operation with w:1, j:true will cause
an immediate sync of the journal
1. With w=default and journal=false, does the write return before actual
journal write happens, but journal write still happens in the background.
Yes this is correct.
Also Is it possible to disable journal commit for a specific mongod
collection while leaving it on for others?
No, the journal setting is set per mongod, and cannot be set per-database