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

CreatePrimaryIndexAsync throws exceptions / ignores IgnoreIfExists

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 3.2.6
    • 3.0.5
    • library
    • .NET Core / Windows
    • 1

    Description

      Summary: using the CreatePrimaryIndexAsync throws exception when a primary index already exists, no matter what IgnoreIfExists is set to.

      Repro:

      1. Use CreatePrimaryIndexAsync to create an index.
      2. Use CreatePrimaryIndexAsync to create an index again (with or without IgnoreIfExists set to true or false)
      3. (see attached source code for complete example)

      Expected:

      If IgnoreIfExists set to true, I would expect no exception if the index already exists.

      Actual:

      Exception (see attached)

      Notes:

      Looking at the code, it appears that IgnoreIfExistsValue in CreatePrimaryQueryIndexOptions is never actually used. The ignore flag is ignored!

      Attachments

        For Gerrit Dashboard: NCBC-2647
        # Subject Branch Project Status CR V

        Activity

          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