Uploaded image for project: 'Couchbase .NET client library'
  1. Couchbase .NET client library
  2. NCBC-2766

CreateScopeAsync not creating collections in ScopeSpec

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.1.0
    • 3.1.2
    • library
    • Enterprise Edition 7.0.0 build 3739 (beta), Windows, latest .NET SDK release from NuGet
    • 1

    Description

      Summary: When defining a ScopeSpec object with Collections, and then using CreateScopeAsync, the scope is created but not the collection.

      Repro:

      1. Create ScopeSpec with name "MyScope".
      2. Add a list of CollectionSpecs to it (coll1, coll2, etc0
      3. Call CreateScopeAsync with the ScopeSpec

      Expected:
      Scope "MyScope" should be created with with the given collections.

      Actual:

      Scope "MyScope" is created, with no collections.

      Notes:

      See attached source code, logs, screenshot.

      Attachments

        1. console-example.log
          18 kB
        2. console-example-internal.log
          3 kB
        3. Program.cs
          2 kB
        4. scope but no collections.png
          scope but no collections.png
          27 kB
        For Gerrit Dashboard: NCBC-2766
        # Subject Branch Project Status CR V

        Activity

          jmorris Jeff Morris added a comment -

          CreateScopeAsync incorrectly has an overload that takes a ScopeSpec
          which makes it appear that if the ScopeSpec contains CollectionSpecs,
          they will be created undernieth the scope. This is incorrect, to create
          collections CreateCollectionAsync will have to be called and the scope
          name passed in to relate the two.

          jmorris Jeff Morris added a comment - CreateScopeAsync incorrectly has an overload that takes a ScopeSpec which makes it appear that if the ScopeSpec contains CollectionSpecs, they will be created undernieth the scope. This is incorrect, to create collections CreateCollectionAsync will have to be called and the scope name passed in to relate the two.

          People

            jmorris Jeff Morris
            matthew.groves Matthew Groves
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty