Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-38565

[N1QL Collections] : system:all_keyspaces doesn't list scopes created from CLI

    XMLWordPrintable

Details

    • Untriaged
    • Unknown

    Description

      Build : 7.0.0-1622

      Setup - 1 node cluster with kv, query and index service
      Steps to reproduce :
      1. Create a default bucket from UI
      2. Create scope - scope1 using N1QL
      create scope default:default.scope1
      3. Create Collection - collection1 using N1QL
      create collection default:default.scope1.collection1
      4. Check system:all_keyspaces

      select `path` from system:all_keyspaces where `scope` is not missing;
      [
        {
          "path": "default:default.scope1.collection1"
        },
        {
          "path": "default:default._default._default"
        }
      ]
      

      5. Now create another scope using couchbase-cli

      /opt/couchbase/bin/couchbase-cli collection-manage --cluster http://localhost:8091 --username Administrator --password password --bucket default --create-scope scope2
      

      6. Check system:all_keyspaces. Its still the same as #4.

      select `path` from system:all_keyspaces where `scope` is not missing;
      [
        {
          "path": "default:default.scope1.collection1"
        },
        {
          "path": "default:default._default._default"
        }
      ]
      

      7. List scopes on CLI

      /opt/couchbase/bin/couchbase-cli collection-manage --cluster http://localhost:8091 --username Administrator --password password --bucket default --list-scopes
      scope2
      scope1
      _default
      

      Scope2 is not listed in system:all_keyspaces

      Because of this, using N1QL, scope2 cannot be used to create collection.

      This issue is also seen with collections created from tools except N1QL. Those collections are not reflected in system:keyspaces.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              marco.greco Marco Greco (Inactive)
              mihir.kamdar Mihir Kamdar (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty