mongodb - 期刊和非期刊Mongodb数据库有什么区别

标签 mongodb database

我刚刚安装了 mongodb 32 位版本,这是当我启动 mongodb 时在我的终端上打印的消息

Server has startup warnings: 
Wed Jul 16 09:53:43.759 [initandlisten] 
Wed Jul 16 09:53:43.759 [initandlisten] ** NOTE: This is a 32 bit MongoDB binary. 
Wed Jul 16 09:53:43.759 [initandlisten] **       32 bit builds are limited to less than 2GB of data (or less with --journal).
Wed Jul 16 09:53:43.759 [initandlisten] **       Note that journaling defaults to off for 32 bit and is currently off.
Wed Jul 16 09:53:43.759 [initandlisten] **       See http://dochub.mongodb.org/core/32bit
Wed Jul 16 09:53:43.759 [initandlisten] 
>

从这里我注意到或理解了两件事,我的 mongodb 数据库仅限于存储小于 2gb 的数据库

它是非日记化的,

日记化使空间进一步减少

我在想

  1. 什么是期刊/非期刊 mongodb 数据库

  2. 期刊数据库相对于非期刊数据库有什么优势,反之亦然?

  3. 是否有必要记录我的数据库?

请帮帮我

谢谢

最佳答案

在 MongoDB 中,它使用预写日志记录来检查是否执行了 write 操作或编写 crash report 这称为日志记录

如果没有no journaling,则表示您处理数百万笔交易。如果某些事务可能崩溃或未完全终止。不会有任何痕迹让你知道这个问题。那么如何找到问题发生的位置并将其恢复

其他情况比如如果数据库意外存在你将无法知道原因

来自 docs它明确指出

Without a journal, if mongod exits unexpectedly, you must assume your data is in an inconsistent state, and you must run either repair or, preferably, resync from a clean member of the replica set. With journaling enabled, if mongod stops unexpectedly, the program can recover everything written to the journal, and the data remains in a consistent state. By default, the greatest extent of lost writes, i.e., those not made to the journal, are those made in the last 100 milliseconds. See commitIntervalMs for more information on the default.

关于mongodb - 期刊和非期刊Mongodb数据库有什么区别,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24775568/

相关文章:

sql - 如何用 R 分析维基百科文章数据库?

mysql - 如果有重复数据如何在mysql中选择特定的数据

java - 结果集的数据结构

node.js - Actor 错误: Cast to ObjectId failed for value "" at path "_id"

python - 为什么在 PyMongo 中处理大型 MongoDB 集合时会丢失数据?我该怎么办?

javascript - Node.js + Mongoose.js 如何获取一个月或一周的订单总数?

windows - npm MongoDB 包在 Windows 上安装失败

java - 通过 SpringData MongoDB 进行验证的方法

c# - 在数据库之间复制表

database - postgresql:md5 消息摘要的数据类型?