-
Type: Task
-
Resolution: Done
-
Priority: Major - P3
-
None
-
Component/s: None
Please ensure that drivers accurately describe the current behavior of the 'fsync' write concern flag, which is:
- 'fsync' is identical to 'j' if mongod is running with a journal (today, 99% of users should be here)
- 'fsync' requests that database files proper be msync()'d only if mongod is not running with a journal
- 'fsync' cannot be used simultaneously with the 'j' flag
Or in other words:
- 'j' means 'sync via the journal if present, or error if not, or if 'fsync' is also set'
- 'fsync' means 'sync via the journal if present, or sync via msync() if there is no journal, but error if 'j' is also set'
Please see SERVER-11399 for background.
Thanks!
---------------------------------------------------------------------------------------------------------------
The following text covers all the bases, adapt for your driver:
- j: If true block until write operations have been committed to the journal. Cannot be used in combination with `fsync`. Prior to MongoDB 2.6 this option was ignored if the server was running without journaling. Starting with MongoDB 2.6 write operations will fail with an exception if this option is used when the server is running without journaling.
- fsync: If true and the server is running without journaling, blocks until the server has synced all data files to disk. If the server is running with journaling, this acts the same as the `j` option, blocking until write operations have been committed to the journal. Cannot be used in combination with `j`.
- depends on
-
CXX-514 Ensure that we document fsync properly (or at all)
- Closed
-
SERVER-11399 merge fsync and j flags
- Closed
- is related to
-
NODE-131 update description of 'fsync' write concern flag
- Closed
-
CDRIVER-246 please update description of 'fsync' write concern flag
- Closed
-
CSHARP-856 please update description of 'fsync' write concern flag
- Closed
-
JAVA-1033 update description of fsync write concern flag
- Closed
-
PYTHON-593 please update description of 'fsync' write concern flag
- Closed
-
RUBY-702 please update description of 'fsync' write concern flag
- Closed