Android cannot use unlinked files

Description

On Unix (and by extension Android) the default thing SQLite does with temporary files is unlink them as soon as they are created so that even if the process crashes they are cleaned up.  However, Android doesn't seem capable of consistently handling this mode and returns errors for filesystem operations on such files.   This can be reproduced by creating a reasonably large database file (> 100 MB) and then creating and index on it.  Smaller databases won't show the behavior since SQLite only uses temporary files when it doesn't have enough memory to perform its operations.

relates to

Activity

Show:

CB robot August 12, 2020 at 2:23 AM

Build couchbase-lite-ios-2.8.0-114 contains couchbase-lite-core commit 5fd61fe with commit message:
: Defer SQLite temporary file unlinking for Android (#1031)

CB robot July 21, 2020 at 10:24 PM

Build couchbase-lite-android-2.8.0-232 contains couchbase-lite-core commit 5fd61fe with commit message:
: Defer SQLite temporary file unlinking for Android (#1031)

CB robot July 21, 2020 at 10:04 PM

Build couchbase-lite-java-2.8.0-214 contains couchbase-lite-core commit 5fd61fe with commit message:
: Defer SQLite temporary file unlinking for Android (#1031)

CB robot July 20, 2020 at 4:04 AM

Build couchbase-lite-net-2.8.0-84 contains couchbase-lite-core commit 5fd61fe with commit message:
: Defer SQLite temporary file unlinking for Android (#1031)

CB robot July 16, 2020 at 1:26 AM

Build couchbase-lite-cblite-2.8.0-86 contains couchbase-lite-core commit 5fd61fe with commit message:
: Defer SQLite temporary file unlinking for Android (#1031)

Fixed
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Story Points

Components

Fix versions

Affects versions

Priority

Instabug

Open Instabug

PagerDuty

Sentry

Zendesk Support

Created July 15, 2020 at 4:13 AM
Updated August 31, 2024 at 10:56 AM
Resolved July 15, 2020 at 9:25 PM
Instabug