The documentation is not clear on what happens when the Write Concern j
Option is set to true and mongod is running without a journal. Does this indicate that the write operation will return after it has been acknowledged to have been committed to the database? OR can the write operation return before the write is committed to the database? Am I thinking about this incorrectly?
To disable journaling for a standalone deployment, start mongod with the --nojournal command line option.
Write concern describes the level of acknowledgment requested from MongoDB for write operations to a standalone mongod or to replica sets or to sharded clusters. In sharded clusters, mongos instances will pass the write concern on to the shards.
The long answer: No, deleting the journal file isn't safe. The idea of journalling is this: A write comes in. Now, to make that write persistent (and the database durable), the write must somehow go to the disk.
You're thinking about it correctly. From the documentation:
Changed in version 2.6: Specifying a write concern that includes j: true to a mongod or mongos running with --nojournal option produces an error. Previous versions would ignore the j: true.
One can only assume that you will get some sort of error while trying to set it up as described.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With