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

Handle db close in inBatch

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 3.0
    • 2.7.0
    • Java, Java-Android
    • Security Level: Public
    • None
    • 3

    Description

      Currently Platform code attempts to free the Core companion object in methods that guarantee that the companion will not be needed again: `close()`, `delete()` and perhaps others.

      These methods, though, are public API methods and can be called by client code in an `inBatch` block. On some platforms this will crash Core. On others it will leak the database.

      Platform code should explicitly disallow calling methods that could free the Core companion object, from within an `inBatch` block.

      Core currently forbids closing or deleting the database, from within a transaction, but cannot, effectively check for operations that would free it (release). Platform code should do this.

      Attachments

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

        Activity

          People

            The Lite The Lite
            blake.meike Blake Meike
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 6h
                6h

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty