Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-12754

Support auto commit option for asynchronous write

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Minor
    • feature-backlog
    • feature-backlog
    • forestdb
    • Security Level: Public
    • None
    • ForestDB: Oct 26 - Nov 13

    Description

      For users who do not want strict synchronous write, calling fsync() is not necessary but fdb_commit() should be invoked periodically in ForestDB, to flush WAL entries and to append DB header.

      It is uncomfortable for users to determine when to call fdb_commit() between consecutive fdb_set() calls. If they call fdb_commit() per each fdb_set(), ForestDB will show the worst performance and the largest write amplification. By contrast, if fdb_commit() is invoked only once after a number of fdb_set() calls, WAL restore procedure will take long time to reconstruct WAL entries when we reopen the DB file.

      The best timing to call fdb_commit() is when WAL becomes full (i.e., the number of WAL entries reaches the configured threshold). We can (almost) minimize the write amplification and maximize the write throughput, while restoring WAL entries takes very short time.

      Hence, for asynchronous write mode, we need to add an option called 'auto_commit' which is similar to the existing 'wal_flush_before_commit' option. With the auto commit option, when fdb_set() is called and WAL becomes full, fdb_commit() is automatically called so that users do not need to manually call it.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            jung-sang Jung-Sang Ahn (Inactive)
            jung-sang Jung-Sang Ahn (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty