Re-opening a database with an Index causes failure

Description

I have code that does this:

  • Create a database

  • Add a couple of indexes

  • Close the database

  • Attempt to re-open it.

The attempt to re-open fails with the LiteCore error:

LiteCoreException{3, 1, "virtual tables may not be altered -- ALTER TABLE "kv_.test_scope_\Q6\No\Dzd\Ns\W\V\K.test_collection_\W\M\Tm\Xw\Nxnp\L\J::index2" ADD COLUMN expiration INTEGER; CREATE INDEX "kv_.test_scope_\Q6\No\Dzd\Ns\W\V\K.test_collection_\W\M\Tm\Xw\Nxnp\L\J::index2_expiration" ON "kv_.test_scope_\Q6\No\Dzd\Ns\W\V\K.test_collection_\W\M\Tm\Xw\Nxnp\L\J::index2" (expiration) WHERE expiration not null"}

The failure is completely repeatable

Activity

Show:

CB robot December 9, 2022 at 6:52 PM

Build couchbase-lite-c-3.1.0-203 contains couchbase-lite-core commit 6d321ed with commit message:
https://couchbasecloud.atlassian.net/browse/CBL-3824#icft=CBL-3824: Re-opening a database with an Index causes failure (#1629)

CB robot December 9, 2022 at 1:38 AM

Build couchbase-lite-log-3.1.0-190 contains couchbase-lite-core commit 6d321ed with commit message:
https://couchbasecloud.atlassian.net/browse/CBL-3824#icft=CBL-3824: Re-opening a database with an Index causes failure (#1629)

CB robot December 9, 2022 at 1:14 AM

Build couchbase-lite-cblite-3.1.0-180 contains couchbase-lite-core commit 6d321ed with commit message:
https://couchbasecloud.atlassian.net/browse/CBL-3824#icft=CBL-3824: Re-opening a database with an Index causes failure (#1629)

CB robot November 30, 2022 at 3:49 AM

Build couchbase-lite-net-3.1.0-142 contains couchbase-lite-core commit 6d321ed with commit message:
https://couchbasecloud.atlassian.net/browse/CBL-3824#icft=CBL-3824: Re-opening a database with an Index causes failure (#1629)

CB robot November 30, 2022 at 1:02 AM

Build couchbase-lite-ios-3.1.0-275 contains couchbase-lite-core commit 6d321ed with commit message:
https://couchbasecloud.atlassian.net/browse/CBL-3824#icft=CBL-3824: Re-opening a database with an Index causes failure (#1629)

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 October 25, 2022 at 8:21 PM
Updated February 7, 2024 at 6:37 PM
Resolved November 14, 2022 at 5:27 PM
Instabug