[BP to 7.1.1 of MB-47512] GSI - With Collection Indexer should index leading MISSING entries

Description

indexer service will not index the document when leading index key is MISSING.
Index selection must be made such that when queries can give right results. Otherwise index must not be chosen.
So index to qualify, the leading index key must be part of the predicate or user must explicitly give leadingkey IS NOT MISSING.

Example:

INSERT INTO default VALUES("k01",{"a":1}); CREATE INDEX ix1 ON default(b); -- index will not have document "k01" SELECT d.* FROM default AS d; -- query will not choose index ix1. By choosing ix1 document "k01" will not return user (that result in wrong result)

By adding MISSING attribute on leading indexing key and indexer indexes MISSING like below. Any query on the default can use ix2. SLA specific queries can create there own targeted indexes.

CREATE INDEX ix2 ON default(b MISSING);

Components

Affects versions

Fix versions

Labels

Environment

None

Release Notes Description

None

Activity

Show:

CB robot October 7, 2022 at 8:54 AM

Build couchbase-server-7.2.0-5000 contains indexing commit 90fdcc9 with commit message:
https://couchbasecloud.atlassian.net/browse/MB-52063#icft=MB-52063: [BP to 7.1.1 of MB 47512] MissingLeadingKey-1 Add missing param upto BridgeAccessor

CB robot October 7, 2022 at 8:54 AM

Build couchbase-server-7.2.0-5000 contains indexing commit 83ce04d with commit message:
https://couchbasecloud.atlassian.net/browse/MB-52063#icft=MB-52063: [BP to 7.1.1 of MB 47512] MissingLeadingKey-2 Add missing attr to index defn

CB robot October 7, 2022 at 8:54 AM

Build couchbase-server-7.2.0-5000 contains indexing commit aa5238f with commit message:
https://couchbasecloud.atlassian.net/browse/MB-52063#icft=MB-52063: [BP to 7.1.1 of MB 47512] MissingLeadingKey-3 Pass missing attr to projector

CB robot October 7, 2022 at 8:54 AM

Build couchbase-server-7.2.0-5000 contains indexing commit 4f03183 with commit message:
https://couchbasecloud.atlassian.net/browse/MB-52063#icft=MB-52063: [BP to 7.1.1 of MB 47512] MissingLeadingKey-4 Add unit tests

CB robot October 7, 2022 at 8:54 AM

Build couchbase-server-7.2.0-5000 contains indexing commit 2fe29f5 with commit message:
https://couchbasecloud.atlassian.net/browse/MB-52063#icft=MB-52063: [BP to 7.1.1 of MB 47512] MissingLeadingKey-6 Enable indexing of Missing Leading Array

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

Details

Assignee

Reporter

Priority

Instabug

Open Instabug

PagerDuty

Sentry

Zendesk Support

Created May 6, 2022 at 9:55 AM
Updated October 7, 2022 at 8:54 AM
Resolved May 16, 2022 at 4:05 AM
Instabug