简体   繁体   中英

Mongo - What does WriteConcern j option do when journaling is turned off?

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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM