buildDeferredIndexes on default collection fails if deferred indexes with different name exist in other collection

Description

Suggested release note:

Fixed a problem where `QueryIndexManager.buildDeferredIndexes` would throw `InternalServerFailureException` when building indexes on the default collection if there were also deferred indexes in a different collection.

To reproduce the problem:

1. Create a deferred index on the default collection.
1. Create a deferred index on a different collection in the same bucket; give the index a different name.
3. Use the Java SDK to build deferred indexes on the default collection, without specifying any options.

Observed: An exception complaining that an index was not found. This happens because the SDK fails to narrow the results to the default collection when calling getAllQueryIndexes to determine which indexes to build.

Workaround: Explicitly specify the "_default" scope and "_default" collection options when calling buildDeferredIndexes.

Environment

None

Gerrit Reviews

None

Release Notes Description

None

Activity

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

Details

Assignee

Reporter

Story Points

Fix versions

Priority

Instabug

Open Instabug

PagerDuty

Sentry

Zendesk Support

Created August 3, 2022 at 9:27 PM
Updated August 6, 2022 at 4:49 AM
Resolved August 6, 2022 at 4:49 AM
Instabug