发布于 2015-09-14 14:59:41 | 170 次阅读 | 评论: 0 | 来源: 网络整理

db.fsyncLock()

Forces the mongod to flush pending all write operations to the disk and locks the entire mongod instance to prevent additional writes until the user releases the lock with the db.fsyncUnlock() command. db.fsyncLock() is an administrative command.

This command provides a simple wrapper around a fsync database command with the following syntax:

{ fsync: 1, lock: true }

This function locks the database and create a window for backup operations.

注解

The database cannot be locked with db.fsyncLock() while profiling is enabled. You must disable profiling before locking the database with db.fsyncLock(). Disable profiling using db.setProfilingLevel() as follows in the mongo shell:

db.setProfilingLevel(0)
最新网友评论  共有(0)条评论 发布评论 返回顶部

Copyright © 2007-2017 PHPERZ.COM All Rights Reserved   冀ICP备14009818号  版权声明  广告服务