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

wal_flush_before_commit doesn't constrain memory usage, if using transactions

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • techdebt-backlog
    • 2.5.1
    • forestdb
    • Security Level: Public
    • None
    • Untriaged
    • Unknown

    Description

      As I understand it, the purpose of wal_flush_before_commit is to constrain memory usage by transferring WAL entries from heap to disk periodically before a commit is issued. This is important on mobile devices which are short on RAM and tend to react badly to running out of memory (iOS will just kill an app process if it's using more than some limited fraction of the physical RAM.)

      Unfortunately, using transactions in ForestDB currently prevents the WAL from being committed to disk during a transaction. The logic at the end of fdb_set (forestdb.cc:2033-2036) calls wal_commit only if there is no database transaction in effect.

      Couchbase Lite does need to use transactions, so I think this is going to be a problem for us.

      Attachments

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

        Activity

          People

            tai.tran Tai Tran (Inactive)
            jens Jens Alfke
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty