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

Disabled WAL sharing causes incorrect behavior on CBL .NET

    XMLWordPrintable

Details

    • Bug
    • Resolution: User Error
    • Major
    • master
    • master
    • None
    • Untriaged
    • Unknown
    • ForestDB: Oct 17 - Nov 4

    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

      Attachments

        Activity

          People

            jimb Jim Borden
            jimb Jim Borden
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              PagerDuty