[DRIVERS-125] update description of 'fsync' write concern flag Created: 30/Oct/13  Updated: 15/Apr/19  Resolved: 11/Nov/15

Status: Closed
Project: Drivers
Component/s: None
Fix Version/s: None

Type: Task Priority: Major - P3
Reporter: Duraid Madina Assignee: Barrie Segal
Resolution: Done Votes: 0
Labels: documentation
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on CXX-514 Ensure that we document fsync properl... Closed
depends on SERVER-11399 merge fsync and j flags Closed
Related
is related to NODE-131 update description of 'fsync' write c... Closed
is related to CDRIVER-246 please update description of 'fsync' ... Closed
is related to CSHARP-856 please update description of 'fsync' ... Closed
is related to JAVA-1033 update description of fsync write con... Closed
is related to PYTHON-593 please update description of 'fsync' ... Closed
is related to RUBY-702 please update description of 'fsync' ... Closed
Driver Compliance:
Key Status/Resolution FixVersion
CXX-514 Done legacy-1.0.1

 Description   

Please ensure that drivers accurately describe the current behavior of the 'fsync' write concern flag, which is:

  1. 'fsync' is identical to 'j' if mongod is running with a journal (today, 99% of users should be here)
  2. 'fsync' requests that database files proper be msync()'d only if mongod is not running with a journal
  3. '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`.

Generated at Thu Feb 08 08:20:49 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.