Uploaded image for project: 'Couchbase Gateway'
  1. Couchbase Gateway
  2. CBG-2913

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

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Critical
    • 3.1.1
    • 3.1.0
    • SyncGateway
    • Security Level: Public
    • None
    • CBG Sprint 122
    • 1

    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

      Attachments

        Activity

          People

            tor.colvin Tor Colvin
            ben.brooks Ben Brooks
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              PagerDuty