MongoDB: db.fsyncUnlock() method
db.fsyncUnlock
The db.fsyncUnlock() method is used to allow writes and reverses the operation of a db.fsyncLock() operation.
Syntax:
db.fsyncUnlock()
Example: MongoDB: db.fsyncUnlock() method
Here is the mongod instance already locked.
> db.fsyncLock();
{
"info" : "now locked against writes, use db.fsyncUnlock() to unlock",
"seeAlso" : "http://dochub.mongodb.org/core/fsynccommand",
"ok" : 1
}
Now the following command will unlocked the mongod instance.
db.fsyncUnlock();
Output:
> db.fsyncUnlock(); { "ok" : 1, "info" : "unlock completed" }
Retrieve the restaurants data from here
Previous:
db.fsyncLock() method
Next:
db.getCollection() method
- Weekly Trends
- Python Interview Questions and Answers: Comprehensive Guide
- Scala Exercises, Practice, Solution
- Kotlin Exercises practice with solution
- MongoDB Exercises, Practice, Solution
- SQL Exercises, Practice, Solution - JOINS
- Java Basic Programming Exercises
- SQL Subqueries
- Adventureworks Database Exercises
- C# Sharp Basic Exercises
- SQL COUNT() with distinct
- JavaScript String Exercises
- JavaScript HTML Form Validation
- Java Collection Exercises
- SQL COUNT() function
- SQL Inner Join