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

QueryIndexManager fails to create indexes in Linq2Couchbase integration tests

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • 3.0.1
    • 3.3.0
    • library
    • 1

    Description

      As an example, this method is being called:

      await manager.CreateIndexAsync("beer-sample", "brewery_id", "brewery_id");
      

      And this is the result:

      Couchbase.Core.Exceptions.ParsingFailureException : syntax error - at - [3000]
         at Couchbase.Query.QueryResultExtensions.ThrowExceptionOnError[T](IQueryResult`1 result, QueryErrorContext context) in C:\Users\bburnett\source\repos\couchbase-net-client\src\Couchbase\Query\QueryResultExtensions.cs:line 56
         at Couchbase.Query.QueryClient.ExecuteQuery[T](QueryOptions options, ITypeSerializer serializer) in C:\Users\bburnett\source\repos\couchbase-net-client\src\Couchbase\Query\QueryClient.cs:line 204
         at Couchbase.Query.QueryClient.QueryAsync[T](String statement, QueryOptions options) in C:\Users\bburnett\source\repos\couchbase-net-client\src\Couchbase\Query\QueryClient.cs:line 67
         at Couchbase.Management.Query.QueryIndexManager.CreateIndexAsync(String bucketName, String indexName, IEnumerable`1 fields, CreateQueryIndexOptions options) in C:\Users\bburnett\source\repos\couchbase-net-client\src\Couchbase\Management\Query\QueryIndexManger.cs:line 67
         at Couchbase.Linq.IntegrationTests.N1QlTestBase.EnsureIndexExists(IBucket bucket, String indexName, String[] fields) in C:\Users\bburnett\source\repos\Linq2Couchbase\Src\Couchbase.Linq.IntegrationTests\N1QLTestBase.cs:line 18
         at Couchbase.Linq.IntegrationTests.QueryTests.JoinTests_InnerJoin_IndexJoin() in C:\Users\bburnett\source\repos\Linq2Couchbase\Src\Couchbase.Linq.IntegrationTests\QueryTests.cs:line 788
         at NUnit.Framework.Internal.TaskAwaitAdapter.GenericAdapter`1.BlockUntilCompleted()
         at NUnit.Framework.Internal.MessagePumpStrategy.NoMessagePumpStrategy.WaitForCompletion(AwaitAdapter awaitable)
         at NUnit.Framework.Internal.AsyncToSyncAdapter.Await(Func`1 invoke)
         at NUnit.Framework.Internal.Commands.TestMethodCommand.RunTestMethod(TestExecutionContext context)
         at NUnit.Framework.Internal.Commands.TestMethodCommand.Execute(TestExecutionContext context)
         at NUnit.Framework.Internal.Commands.BeforeAndAfterTestCommand.<>c__DisplayClass1_0.<Execute>b__0()
         at NUnit.Framework.Internal.Commands.BeforeAndAfterTestCommand.RunTestMethodInThreadAbortSafeZone(TestExecutionContext context, Action action)
      

      Likely cause: Not escaping the - character in the bucket name.

      Attachments

        Issue Links

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

          Activity

            btburnett3 Brant Burnett created issue -

            Confirmed, passing "`beer-sample`" as the bucket name instead of "beer-sample" is a valid workaround.

            btburnett3 Brant Burnett added a comment - Confirmed, passing "`beer-sample`" as the bucket name instead of "beer-sample" is a valid workaround.
            ingenthr Matt Ingenthron made changes -
            Field Original Value New Value
            Rank Ranked higher
            jmorris Jeff Morris made changes -
            Status New [ 10003 ] Open [ 1 ]
            jmorris Jeff Morris made changes -
            Fix Version/s 3.0.4 [ 17014 ]
            Fix Version/s 3.0.3 [ 16913 ]
            jmorris Jeff Morris made changes -
            Fix Version/s 3.0.5 [ 17033 ]
            Fix Version/s 3.0.4 [ 17014 ]
            jmorris Jeff Morris made changes -
            Fix Version/s backlog-3.0 [ 16772 ]
            Fix Version/s 3.0.5 [ 17033 ]
            jmorris Jeff Morris made changes -
            Assignee Jeff Morris [ jmorris ]
            jmorris Jeff Morris added a comment -

            This need to be brought up as an agenda item and discussed with the team as changing it should be done by all SDK's if it is done.

            jmorris Jeff Morris added a comment - This need to be brought up as an agenda item and discussed with the team as changing it should be done by all SDK's if it is done.

            Group decision: SDK should surround everything in backticks.

            This will have to be called out in the release notes, as it will then break for anyone using the workaround.

            richard.ponton Richard Ponton added a comment - Group decision: SDK should surround everything in backticks. This will have to be called out in the release notes, as it will then break for anyone using the workaround.
            jmorris Jeff Morris made changes -
            Fix Version/s 3.1.0 [ 16741 ]
            Fix Version/s backlog-3.0 [ 16772 ]
            jmorris Jeff Morris added a comment -

            CREATE INDEX brewery_id ON beer-sample(brewery_id) USING GSI WITH {"defer_build":False};
            

            [
              {
                "code": 3000,
                "msg": "syntax error - at -",
                "query": "CREATE INDEX brewery_id ON beer-sample(brewery_id) USING GSI WITH {\"defer_build\":False};"
              }
            ]
            

            jmorris Jeff Morris added a comment - CREATE INDEX brewery_id ON beer-sample(brewery_id) USING GSI WITH {"defer_build":False}; [ { "code": 3000, "msg": "syntax error - at -", "query": "CREATE INDEX brewery_id ON beer-sample(brewery_id) USING GSI WITH {\"defer_build\":False};" } ]
            jmorris Jeff Morris made changes -
            Fix Version/s backlog-3.0 [ 16772 ]
            Fix Version/s 3.1.0 [ 16741 ]
            jmorris Jeff Morris made changes -
            Fix Version/s 3.2.1 [ 17902 ]
            Fix Version/s backlog-3.0 [ 16772 ]
            jmorris Jeff Morris made changes -
            Assignee Jeff Morris [ jmorris ]
            jmorris Jeff Morris made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            jmorris Jeff Morris made changes -
            Resolution Fixed [ 1 ]
            Status In Progress [ 3 ] Resolved [ 5 ]
            jmorris Jeff Morris made changes -
            Fix Version/s 3.2.2 [ 18043 ]
            Fix Version/s 3.2.1 [ 17902 ]
            jmorris Jeff Morris made changes -
            Resolution Fixed [ 1 ]
            Status Resolved [ 5 ] Reopened [ 4 ]
            jmorris Jeff Morris made changes -
            Fix Version/s 3.2.3 [ 18050 ]
            Fix Version/s 3.2.2 [ 18043 ]
            jmorris Jeff Morris added a comment -

            Reopening as patch causes a regression when SELECT-BUCKET is called.

            jmorris Jeff Morris added a comment - Reopening as patch causes a regression when SELECT-BUCKET is called.
            jmorris Jeff Morris made changes -
            Fix Version/s 3.2.4 [ 18075 ]
            Fix Version/s 3.2.3 [ 18050 ]
            jmorris Jeff Morris made changes -
            Link This issue relates to NCBC-2955 [ NCBC-2955 ]
            jmorris Jeff Morris made changes -
            Fix Version/s 3.2.5 [ 18102 ]
            Fix Version/s 3.2.4 [ 18075 ]
            jmorris Jeff Morris made changes -
            Fix Version/s 3.2.6 [ 18208 ]
            Fix Version/s 3.2.5 [ 18102 ]
            jmorris Jeff Morris made changes -
            Fix Version/s 3.2.7 [ 18230 ]
            Fix Version/s 3.2.6 [ 18208 ]
            jmorris Jeff Morris made changes -
            Fix Version/s 3.2.8 [ 18237 ]
            Fix Version/s 3.2.7 [ 18230 ]
            jmorris Jeff Morris made changes -
            Fix Version/s 3.2.9 [ 18306 ]
            Fix Version/s 3.2.8 [ 18237 ]
            jmorris Jeff Morris made changes -
            Fix Version/s 3.3.0 [ 18323 ]
            Fix Version/s 3.2.9 [ 18306 ]
            jmorris Jeff Morris added a comment - NCBC-3107
            jmorris Jeff Morris made changes -
            Resolution Duplicate [ 3 ]
            Status Reopened [ 4 ] Resolved [ 5 ]
            jmorris Jeff Morris made changes -
            Link This issue duplicates NCBC-3107 [ NCBC-3107 ]
            ingenthr Matt Ingenthron made changes -
            Workflow Couchbase SDK Workflow [ 171261 ] Couchbase SDK Workflow with Review [ 249006 ]

            People

              jmorris Jeff Morris
              btburnett3 Brant Burnett
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty