Details
Description
Commit 86594dc (MB-18747: Temporarily disable WAL sharing) has caused some incorrect behavior in Couchbase Lite .NET (tested on Windows 10 64-bit so far). Specifically, there is a document expiration system implemented which relies on a separate key value store to the main one to store expiration times of documents. A query on the documents should return all the documents applicable to the time range, but after this commit only a varying number (around half or less) are actually returned. This has caused a unit test failure.
Adding _MVCC_WAL_ENABLE to the build flags will correct this behavior as it enables WAL sharing again. I'm not sure why this affects only this particular issue so far but I can say that without this flag it fails and with it it does not. One thing to note is that multiple threads will access the key value stores and they each maintain their own connection.
This is the test in question if you are interested:
https://github.com/couchbase/couchbase-lite-net/blob/master/src/Couchbase.Lite.Tests.Shared/DocumentTest.cs#L63
It eventually boils down to:
https://github.com/couchbaselabs/cbforest/blob/master/C/c4ExpiryEnumerator.cc