Uploaded image for project: 'Drivers'
  1. Drivers
  2. DRIVERS-125

update description of 'fsync' write concern flag

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Component/s: None

      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`.

            Assignee:
            barrie Barrie Segal
            Reporter:
            duraid.madina@10gen.com Duraid Madina
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: