Details
-
Bug
-
Resolution: Unresolved
-
Major
-
2.5.1
-
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.