[3.1.1 backport] /db/ routing does not work with default collection that coexists with named collection

Description

The API routing we use to allow /db/ to map to /db._default._default/ doesn't work when the default collection is explicitly defined alongside a named collection.

  • Removing the named collection makes this work (i.e. we're handling an explicit default collection OK, but only when it's the ONLY collection defined).

 

Repro steps:

  1. Create database with _default scope, the _default collection and a named collection

  2. Make a doc using PUT /db._default._default/doc1 and it works

  3. Make a doc using PUT /db._default.customCollection/doc2 and it works

  4. Make a doc using PUT /db/doc3 and get a 404 keyspace not found error

    • This should route to the default collection, like in step 2

 

Skipped unit test that repros: TestCollectionsPutDocInDefaultCollectionWithNamedCollections

Activity

Show:
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 April 28, 2023 at 2:22 PM
Updated August 31, 2024 at 10:58 AM
Resolved May 31, 2023 at 4:32 PM
Instabug