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

API: Fix database directory setup

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 2.6.0
    • 3.0
    • API, Java-Android
    • Security Level: Public
    • 1

    Description

      Currently the file system locations used for the entire platform are part of the configuration for each Database. This means the one Config can move the location out from under the other. It is really broken.

      Setting up the file system needs to be part of CouchbaseLite.init

      This is an API change and cannot happen until 3.0

      Attachments

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

        Activity

          pasin Pasin Suriyentrakorn added a comment - - edited

          Blake Meike If two database instances are configured with a different database directory, they will be two physical databases located in two location ; the physical database is not moved by changing the database directory in the DatabaseConfiguration. 

          pasin Pasin Suriyentrakorn added a comment - - edited Blake Meike  If two database instances are configured with a different database directory, they will be two physical databases located in two location ; the physical database is not moved by changing the database directory in the DatabaseConfiguration. 
          blake.meike Blake Meike added a comment -

          I think I was not clear. There are two directories associated with every db: the directory that the database is in and a temp directory. The temp directory moves with the database (as it must, because it must be on the same device). The temp directory, on the other hand, is global, not per-database. Creating a new database in a new directory can cause "cannot link across device" errors.

          blake.meike Blake Meike added a comment - I think I was not clear. There are two directories associated with every db: the directory that the database is in and a temp directory. The temp directory moves with the database (as it must, because it must be on the same device). The temp directory, on the other hand, is global, not per-database. Creating a new database in a new directory can cause "cannot link across device" errors.
          blake.meike Blake Meike added a comment -

          In fact, there are 3 directories: logging, core scratch and SQLite scratch. Jim Borden has changed the way the 2nd to are handled, to be much more reasonable (SQLite scratch is specified exactly once, at startup; core scratch is always a sibling of the current database).

          This ticket is just to verify that the code that used to handle the "tmp directory" has been removed.

          blake.meike Blake Meike added a comment - In fact, there are 3 directories: logging, core scratch and SQLite scratch. Jim Borden has changed the way the 2nd to are handled, to be much more reasonable (SQLite scratch is specified exactly once, at startup; core scratch is always a sibling of the current database). This ticket is just to verify that the code that used to handle the "tmp directory" has been removed.
          blake.meike Blake Meike added a comment -

          Fixed in couchbaselabs/couchbase-lite-java-ee-root@433b67567c7603435a

          blake.meike Blake Meike added a comment - Fixed in couchbaselabs/couchbase-lite-java-ee-root@433b67567c7603435a

          People

            blake.meike Blake Meike
            blake.meike Blake Meike
            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