Details
Description
After updating the forestDB to the current stable branch to uptake the fix for buffer overflow issue when compacting the database ( [#1860|https://github.com/couchbase/couchbase-lite-ios/issues/1860] , MB-25808 , and CBSE-4099), switching forestDB compaction mode from manual to auto cause file busy error (-23).
Here is the unit test that causes the issue: https://github.com/couchbase/couchbase-lite-ios/blob/master/Unit-Tests/DatabaseInternal_Tests.m#L1032-L1049
Here is the CBForest Code that has the issue: https://github.com/couchbaselabs/cbforest/blob/1b2efb6c6f18996cabcfbc091dd415722bd189be/C/c4Database.cc#L262-L270
Here is the returned error line in ForestDB: https://github.com/couchbase/forestdb/blob/stable/src/forestdb.cc#L7556
Please note that the same test passes when using https://github.com/couchbase/forestdb/commits/c7088049aaf413820b56af90f61de724e7efe154 commit (the commit that CBL is using in the current master branch as of now).
Reference github issue: https://github.com/couchbase/couchbase-lite-ios/issues/1886
Please note that this is a blocker for CBSE-4099.