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

Database could be corrupted after being copied in linux platform

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • 2.8.8
    • 3.0.2
    • LiteCore
    • Security Level: Public
    • None

    Description

      Based on the email discussion about database corruption after being copied on Android platform.

      Jens,
      Here is another corrupted DB. This guy claims that he can repro the problem, pretty much at will. He has a Samsung device (S10) with unusually large storage. I asked him about it and he is quite clear that it is not a removable card.

      Also in her are the logcat logs from around the time the problem occurred, and a copy of the db before it was corrupted.

      Here is my understanding of the sequence of events:

      1) Application syncs a complete local instance of the db.
      2) Using Database.copy, it copies that instance to Android external storage
      3) Delete the application and all of its storage. This should not affect the external copy.
      4) Install a new copy of the application.
      5) At startup the application looks for a db on external storage. If it finds one, it uses Database.copy to copy it into the app sandbox.
      6) It opens the sandbox copy of the db and finds it corrupted.

      I mentioned to the customer that I thought that using OS copy might be a better way to do this. Database.copy is going to give the copy a new UUID and thus make replication sub-optimal

      -blake

      Attachments

        Issue Links

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

          Activity

            Build couchbase-lite-core-3.0.2-12 contains couchbase-lite-core commit 4270b65 with commit message:
            CBL-3074 : Database could be corrupted after being copied in linux pl… (#1465)

            build-team Couchbase Build Team added a comment - Build couchbase-lite-core-3.0.2-12 contains couchbase-lite-core commit 4270b65 with commit message: CBL-3074 : Database could be corrupted after being copied in linux pl… (#1465)
            jianmin.zhao Jianmin Zhao added a comment -

            verified in WSL2/Ubutun

            jianmin.zhao Jianmin Zhao added a comment - verified in WSL2/Ubutun

            Build couchbase-lite-ios-3.0.2-7 contains couchbase-lite-core commit 4270b65 with commit message:
            CBL-3074 : Database could be corrupted after being copied in linux pl… (#1465)

            build-team Couchbase Build Team added a comment - Build couchbase-lite-ios-3.0.2-7 contains couchbase-lite-core commit 4270b65 with commit message: CBL-3074 : Database could be corrupted after being copied in linux pl… (#1465)

            Build couchbase-lite-android-3.0.2-6 contains couchbase-lite-core commit 4270b65 with commit message:
            CBL-3074 : Database could be corrupted after being copied in linux pl… (#1465)

            build-team Couchbase Build Team added a comment - Build couchbase-lite-android-3.0.2-6 contains couchbase-lite-core commit 4270b65 with commit message: CBL-3074 : Database could be corrupted after being copied in linux pl… (#1465)

            Build couchbase-lite-java-3.0.2-6 contains couchbase-lite-core commit 4270b65 with commit message:
            CBL-3074 : Database could be corrupted after being copied in linux pl… (#1465)

            build-team Couchbase Build Team added a comment - Build couchbase-lite-java-3.0.2-6 contains couchbase-lite-core commit 4270b65 with commit message: CBL-3074 : Database could be corrupted after being copied in linux pl… (#1465)

            Build couchbase-lite-net-3.0.2-2 contains couchbase-lite-core commit 4270b65 with commit message:
            CBL-3074 : Database could be corrupted after being copied in linux pl… (#1465)

            build-team Couchbase Build Team added a comment - Build couchbase-lite-net-3.0.2-2 contains couchbase-lite-core commit 4270b65 with commit message: CBL-3074 : Database could be corrupted after being copied in linux pl… (#1465)

            Build couchbase-lite-c-3.0.2-29 contains couchbase-lite-core commit 4270b65 with commit message:
            CBL-3074 : Database could be corrupted after being copied in linux pl… (#1465)

            build-team Couchbase Build Team added a comment - Build couchbase-lite-c-3.0.2-29 contains couchbase-lite-core commit 4270b65 with commit message: CBL-3074 : Database could be corrupted after being copied in linux pl… (#1465)

            People

              jianmin.zhao Jianmin Zhao
              pasin Pasin Suriyentrakorn
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty