简体   繁体   English

Mongo - 当关闭日记功能时,WriteConcern j选项会做什么?

[英]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. 当Write Concern j Option设置为true并且mongod在没有日志的情况下运行时,文档不清楚。 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. 在版本2.6中更改:指定包含j:true的写入问题,使用--nojournal选项运行的mongod或mongos会产生错误。 Previous versions would ignore the j: true. 以前的版本会忽略j:true。

One can only assume that you will get some sort of error while trying to set it up as described. 人们只能假设在尝试如上所述进行设置时会出现某种错误。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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