Cleanup bundle folder when creating a database fails

Description

When creating a new database, if somehow a failure happens after a bundle folder is created, an empty bundle folder will be left behind. As a result, when trying to create a database again later, "WrongFormat" will always be thrown.

Basically if a failure happens after the following line when creating a database, the empty bundle folder will be left behind:

https://github.com/couchbase/couchbase-lite-core/blob/master/LiteCore/Database/DatabaseImpl.cc#L122

Activity

Show:

CB robot February 8, 2022 at 1:54 AM

Build couchbase-lite-c-3.1.0-78 contains couchbase-lite-core commit 01833cf with commit message:
https://couchbasecloud.atlassian.net/browse/CBL-2610#icft=CBL-2610 : remove directory created by failed openNamed(). (#1368)

CB robot February 4, 2022 at 7:19 AM

Build couchbase-lite-ios-3.1.0-103 contains couchbase-lite-core commit 01833cf with commit message:
https://couchbasecloud.atlassian.net/browse/CBL-2610#icft=CBL-2610 : remove directory created by failed openNamed(). (#1368)

CB robot February 3, 2022 at 8:39 PM

Build couchbase-lite-java-3.1.0-120 contains couchbase-lite-core commit 01833cf with commit message:
https://couchbasecloud.atlassian.net/browse/CBL-2610#icft=CBL-2610 : remove directory created by failed openNamed(). (#1368)

CB robot February 3, 2022 at 8:36 PM

Build couchbase-lite-android-3.1.0-122 contains couchbase-lite-core commit 01833cf with commit message:
https://couchbasecloud.atlassian.net/browse/CBL-2610#icft=CBL-2610 : remove directory created by failed openNamed(). (#1368)

CB robot February 3, 2022 at 5:27 AM

Build couchbase-lite-net-3.1.0-26 contains couchbase-lite-core commit 01833cf with commit message:
https://couchbasecloud.atlassian.net/browse/CBL-2610#icft=CBL-2610 : remove directory created by failed openNamed(). (#1368)

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

Details

Assignee

Reporter

Story Points

Components

Sprint

Fix versions

Affects versions

Priority

Instabug

Open Instabug

PagerDuty

Sentry

Zendesk Support

Created November 30, 2021 at 7:32 PM
Updated March 13, 2023 at 8:18 PM
Resolved March 13, 2023 at 8:18 PM
Instabug