Uploaded image for project: 'Couchbase Lite'
  1. Couchbase Lite
  2. CBL-579

SDK fails for opening Database files over 2GB

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.0
    • 2.7.1
    • LiteCore
    • Security Level: Public
    • CBL Sprint 14
    • 2

    Description

      https://github.com/couchbase/couchbase-lite-net/issues/1197

      Library Version

      CouchbaseLite/2.6.0 (.NET; Microsoft Windows 10.0.18363) Build/129 LiteCore/2.6.0 (2193) Commit/e715812a

      .NET Runtime

      .NET Core SDK (reflecting any global.json):
      Version: 3.0.100
      Commit: 04339c3a26

      Operating System / Device Details

      Microsoft Windows 10.0.18363

      Log Output

      2019-12-10 10:56:27.098-06:00 [1]| INFO) [Database] (Startup) [1] CouchbaseLite/2.6.0 (.NET; Microsoft Windows 10.0.18363) Build/129 LiteCore/2.6.0 (2193) Commit/e715812a
      2019-12-10 10:57:34.610-06:00 [1]| INFO) [Database] (Database) [1] Opening database at C:\Users\Bruno\source\repos\CouchbaseLiteReader\CouchbaseLiteReader\bin\x64\Debug\netcoreapp3.0\CouchbaseLite\testDatabase.cblite2

      Expected behavior

      Couchbase Lite SDK should be able to work with database files larger than 2GB.

      Actual behavior

      Exception is thrown when opening the database.

      Couchbase.Lite.CouchbaseLiteException: CouchbaseLiteException (LiteCoreDomain / 21): file/data is not in the requested format.
      at LiteCore.Interop.NativeHandler.ThrowOrHandle()
      at LiteCore.Interop.NativeHandler.Execute(C4TryLogicDelegate2 block)
      at LiteCore.LiteCoreBridge.Check(C4TryLogicDelegate2 block)
      at Couchbase.Lite.Database.<>c_DisplayClass91_0.b_0()
      at Couchbase.Lite.Support.ThreadSafety.DoLocked(Action a)
      at Couchbase.Lite.Database.Open()
      at Couchbase.Lite.Database..ctor(String name, DatabaseConfiguration configuration)
      at CouchbaseLiteReader.Program.Main(String[] args) in C:\Users\Bruno\source\repos\CouchbaseLiteReader\CouchbaseLiteReader\Program.cs:line 23

      Steps To Reproduce

      1. Run attached project
        1.1. It fails if loopCount variable is equal to 2400 (Database generated will be around 3GB)
        1.2. It works fine if loopCount variable is equal to 1400 (Database generated will be around 1.5GB)

      Reproduction Project

      CouchbaseLiteReader.zip

       

      Note: Reproduced on Windows.  macOS / iOS appears safe, Linux / Android still unknown

      Attachments

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

        Activity

          Build couchbase-lite-net-2.7.1-13 contains couchbase-lite-core commit 5f118bd with commit message:
          CBL-579 Allow Windows to open databases over 2 GB

          build-team Couchbase Build Team added a comment - Build couchbase-lite-net-2.7.1-13 contains couchbase-lite-core commit 5f118bd with commit message: CBL-579 Allow Windows to open databases over 2 GB

          Build couchbase-lite-cblite-2.8.0-7 contains couchbase-lite-core commit 0707979 with commit message:
          CBL-579 Allow Windows to open databases over 2 GB

          build-team Couchbase Build Team added a comment - Build couchbase-lite-cblite-2.8.0-7 contains couchbase-lite-core commit 0707979 with commit message: CBL-579 Allow Windows to open databases over 2 GB

          Build couchbase-lite-ios-2.7.1-13 contains couchbase-lite-core commit 5f118bd with commit message:
          CBL-579 Allow Windows to open databases over 2 GB

          build-team Couchbase Build Team added a comment - Build couchbase-lite-ios-2.7.1-13 contains couchbase-lite-core commit 5f118bd with commit message: CBL-579 Allow Windows to open databases over 2 GB

          Build couchbase-lite-android-2.7.1-5 contains couchbase-lite-core commit 5f118bd with commit message:
          CBL-579 Allow Windows to open databases over 2 GB

          build-team Couchbase Build Team added a comment - Build couchbase-lite-android-2.7.1-5 contains couchbase-lite-core commit 5f118bd with commit message: CBL-579 Allow Windows to open databases over 2 GB

          Build couchbase-lite-net-2.8.0-9 contains couchbase-lite-core commit 0707979 with commit message:
          CBL-579 Allow Windows to open databases over 2 GB

          build-team Couchbase Build Team added a comment - Build couchbase-lite-net-2.8.0-9 contains couchbase-lite-core commit 0707979 with commit message: CBL-579 Allow Windows to open databases over 2 GB

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty