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

Upserting to <7.0 clusters does not upsert the content

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • None
    • 3.1.5
    • None
    • 1

    Description

      Running an upsert on the DefaultCollection does not upsert the content with the document for <7.0 server version, it just upserts an empty doc ( "{}" in the docs UI)

      It can be recreated with just a basic upsert:
      await Bucket.DefaultCollection.UpsertAsync("id", "content");

      The upsert will succeed, but if you inspect the doc there is no content in the doc.

      This happens with the current head of master (798e6e34c6180d339c53076fbf4cc2547c81d496) and appears not to have worked since NCBC-2839 (c410926a8131eb40483cd60370561dc0fcbe6244) and the previous commit.

      Here are some logs of this happening, though there doesn't appear to be any issues reported. SdkdConsole.log.zip

      Attachments

        Issue Links

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

          Activity

            jmorris Jeff Morris added a comment -

            This is CB 6.6.1:

            The first 3 items are from master head and last two are from 3.1.3 tag.

            jmorris Jeff Morris added a comment - This is CB 6.6.1: The first 3 items are from master head and last two are from 3.1.3 tag.

            Hey Jeff,

            The fix works for 6.6 and 6.5. However I am getting a lot of log messages when running against 6.0 and 5.5.

            This message is being reported on the first KV op in the situational tests:

            First error

            info: Couchbase.KeyValue.CouchbaseCollection[0]
            [3081.26 INFO] (SDKD log:137) Possible non-terminal error fetching CID.
            [3081.26 INFO] (SDKD log:137) Couchbase.AuthenticationFailureException: Exception of type 'Couchbase.AuthenticationFailureException' was thrown.
            [3081.26 INFO] (LineGobbler doFilter:115) +++ Following exception has internal ID: 1
            [3081.26 INFO] (SDKD log:137) at Couchbase.Core.ClusterNode.ExecuteOp(Func`4 sender, IOperation op, Object state, CancellationTokenPair tokenPair) in C:\jenkins\workspace\sdk-net-situational-release\dotnet-situational-all\couchbase-net-client\src\Couchbase\Core\ClusterNode.cs:line 534
            at Couchbase.CouchbaseBucket.SendAsync(IOperation op, CancellationTokenPair tokenPair) in C:\jenkins\workspace\sdk-net-situational-release\dotnet-situational-all\couchbase-net-client\src\Couchbase\CouchbaseBucket.cs:line 228
            at Couchbase.Core.Retry.RetryOrchestrator.RetryAsync(BucketBase bucket, IOperation operation, CancellationTokenPair tokenPair) in C:\jenkins\workspace\sdk-net-situational-release\dotnet-situational-all\couchbase-net-client\src\Couchbase\Core\Retry\RetryOrchestrator.cs:line 176
            at Couchbase.KeyValue.CouchbaseCollection.GetCidAsync(String fullyQualifiedName, Boolean sendAsBody) in C:\jenkins\workspace\sdk-net-situational-release\dotnet-situational-all\couchbase-net-client\src\Couchbase\KeyValue\CouchbaseCollection.cs:line 959
            at Couchbase.KeyValue.CouchbaseCollection.PopulateCidAsync() in C:\jenkins\workspace\sdk-net-situational-release\dotnet-situational-all\couchbase-net-client\src\Couchbase\KeyValue\CouchbaseCollection.cs:line 908
            [3081.26 INFO] (SDKD log:137) ----------------------Context Info--------------------------
            [3081.26 INFO] (SDKD log:137) {"DispatchedFrom":null,"DispatchedTo":null,"DocumentKey":"","ClientContextId":"48","Cas":0,"Status":36,"BucketName":"default","CollectionName":null,"ScopeName":null,"Message":"KV Error:

            Unknown macro: {Name="EACCESS", Description="Not authorized for command", Attributes="support"}

            ","OpCode":"GetCidByName"}

            Followed by a similar error that is repeated constantly throughout the test:

            Repeated error

            [3081.27 INFO] (SDKD log:137) info: Couchbase.KeyValue.CouchbaseCollection[0]
            [3081.27 INFO] (SDKD log:137) Possible non-terminal error fetching CID.
            [3081.27 INFO] (SDKD log:137) Couchbase.AuthenticationFailureException: Exception of type 'Couchbase.AuthenticationFailureException' was thrown.
            [3081.27 INFO] (SDKD log:137) +++ Received exception of ID 0
            [3081.27 INFO] (SDKD log:137) ----------------------Context Info--------------------------
            [3081.27 INFO] (SDKD log:137) {"DispatchedFrom":null,"DispatchedTo":null,"DocumentKey":"","ClientContextId":"50","Cas":0,"Status":36,"BucketName":"default","CollectionName":null,"ScopeName":null,"Message":"KV Error:

            Unknown macro: {Name="EACCESS", Description="Not authorized for command", Attributes="support"}

            ","OpCode":"GetCidByName"}
            [3081.27 INFO] (SDKD log:137)

            The documents are getting upserted, but there is a lot of noise in the logs due to this.

            will.broadbelt Will Broadbelt added a comment - Hey Jeff, The fix works for 6.6 and 6.5. However I am getting a lot of log messages when running against 6.0 and 5.5. This message is being reported on the first KV op in the situational tests: First error info: Couchbase.KeyValue.CouchbaseCollection [0] [3081.26 INFO] (SDKD log:137) Possible non-terminal error fetching CID. [3081.26 INFO] (SDKD log:137) Couchbase.AuthenticationFailureException: Exception of type 'Couchbase.AuthenticationFailureException' was thrown. [3081.26 INFO] (LineGobbler doFilter:115) +++ Following exception has internal ID: 1 [3081.26 INFO] (SDKD log:137) at Couchbase.Core.ClusterNode.ExecuteOp(Func`4 sender, IOperation op, Object state, CancellationTokenPair tokenPair) in C:\jenkins\workspace\sdk-net-situational-release\dotnet-situational-all\couchbase-net-client\src\Couchbase\Core\ClusterNode.cs:line 534 at Couchbase.CouchbaseBucket.SendAsync(IOperation op, CancellationTokenPair tokenPair) in C:\jenkins\workspace\sdk-net-situational-release\dotnet-situational-all\couchbase-net-client\src\Couchbase\CouchbaseBucket.cs:line 228 at Couchbase.Core.Retry.RetryOrchestrator.RetryAsync(BucketBase bucket, IOperation operation, CancellationTokenPair tokenPair) in C:\jenkins\workspace\sdk-net-situational-release\dotnet-situational-all\couchbase-net-client\src\Couchbase\Core\Retry\RetryOrchestrator.cs:line 176 at Couchbase.KeyValue.CouchbaseCollection.GetCidAsync(String fullyQualifiedName, Boolean sendAsBody) in C:\jenkins\workspace\sdk-net-situational-release\dotnet-situational-all\couchbase-net-client\src\Couchbase\KeyValue\CouchbaseCollection.cs:line 959 at Couchbase.KeyValue.CouchbaseCollection.PopulateCidAsync() in C:\jenkins\workspace\sdk-net-situational-release\dotnet-situational-all\couchbase-net-client\src\Couchbase\KeyValue\CouchbaseCollection.cs:line 908 [3081.26 INFO] (SDKD log:137) ---------------------- Context Info -------------------------- [3081.26 INFO] (SDKD log:137) {"DispatchedFrom":null,"DispatchedTo":null,"DocumentKey":"","ClientContextId":"48","Cas":0,"Status":36,"BucketName":"default","CollectionName":null,"ScopeName":null,"Message":"KV Error: Unknown macro: {Name="EACCESS", Description="Not authorized for command", Attributes="support"} ","OpCode":"GetCidByName"} Followed by a similar error that is repeated constantly throughout the test: Repeated error [3081.27 INFO] (SDKD log:137) info: Couchbase.KeyValue.CouchbaseCollection [0] [3081.27 INFO] (SDKD log:137) Possible non-terminal error fetching CID. [3081.27 INFO] (SDKD log:137) Couchbase.AuthenticationFailureException: Exception of type 'Couchbase.AuthenticationFailureException' was thrown. [3081.27 INFO] (SDKD log:137) +++ Received exception of ID 0 [3081.27 INFO] (SDKD log:137) ---------------------- Context Info -------------------------- [3081.27 INFO] (SDKD log:137) {"DispatchedFrom":null,"DispatchedTo":null,"DocumentKey":"","ClientContextId":"50","Cas":0,"Status":36,"BucketName":"default","CollectionName":null,"ScopeName":null,"Message":"KV Error: Unknown macro: {Name="EACCESS", Description="Not authorized for command", Attributes="support"} ","OpCode":"GetCidByName"} [3081.27 INFO] (SDKD log:137) The documents are getting upserted, but there is a lot of noise in the logs due to this.
            jmorris Jeff Morris added a comment -

            Will Broadbelt -

            Ok, more server specific issues; i'll push a patch asap.

            -Jeff

            jmorris Jeff Morris added a comment - Will Broadbelt - Ok, more server specific issues; i'll push a patch asap. -Jeff
            will.broadbelt Will Broadbelt added a comment - - edited

            Seems better now with the latest patch. Only get the initial log message: (on 6.0 & 5.5)

            Error

            [736.85 INFO] (LineGobbler doFilter:115) +++ Following exception has internal ID: 3
            [736.85 INFO] (SDKD log:137) at Sdkd.JtokenExtensions.ToBool(JToken jt) in C:\jenkins\workspace\sdk-net-situational-release\dotnet-situational-all\sdkd-net\src\Sdkd\JTokenExtensions.cs:line 39
            at SdkdConsole.Daemon.Handle.DispatchCommand(Request req, String collectionsType, Int32 scopeNum, Int32 collectionNum) in C:\jenkins\workspace\sdk-net-situational-release\dotnet-situational-all\sdkd-net\src\SdkdConsole\Daemon\Handle.cs:line 238, Defaulting to admin credentials.
            [736.85 INFO] (SDKD log:137) info: Couchbase.KeyValue.CouchbaseCollection[0]
            [736.85 INFO] (SDKD log:137) Possible non-terminal error fetching CID.
            [736.85 INFO] (SDKD log:137) Couchbase.AuthenticationFailureException: Exception of type 'Couchbase.AuthenticationFailureException' was thrown.
            [736.85 INFO] (SDKD log:137) +++ Received exception of ID 0
            [736.85 INFO] (SDKD log:137) ----------------------Context Info--------------------------
            [736.85 INFO] (SDKD log:137) {"DispatchedFrom":null,"DispatchedTo":null,"DocumentKey":"","ClientContextId":"1124","Cas":0,"Status":36,"BucketName":"default","CollectionName":null,"ScopeName":null,"Message":"KV Error:

            Unknown macro: {Name="EACCESS", Description="Not authorized for command", Attributes="support"}

            ","OpCode":"GetCidByName"}
            [736.85 INFO] (SDKD log:137)
            [736.85 INFO] (SDKD log:137) info: Couchbase.KeyValue.CouchbaseCollection[0]
            [736.85 INFO] (SDKD log:137) Collections (GET_CID) are not supported on this server version.

            And then the messages are far less frequent after that. I shall run the rest of the tests to confirm the fix.

            will.broadbelt Will Broadbelt added a comment - - edited Seems better now with the latest patch. Only get the initial log message: (on 6.0 & 5.5) Error [736.85 INFO] (LineGobbler doFilter:115) +++ Following exception has internal ID: 3 [736.85 INFO] (SDKD log:137) at Sdkd.JtokenExtensions.ToBool(JToken jt) in C:\jenkins\workspace\sdk-net-situational-release\dotnet-situational-all\sdkd-net\src\Sdkd\JTokenExtensions.cs:line 39 at SdkdConsole.Daemon.Handle.DispatchCommand(Request req, String collectionsType, Int32 scopeNum, Int32 collectionNum) in C:\jenkins\workspace\sdk-net-situational-release\dotnet-situational-all\sdkd-net\src\SdkdConsole\Daemon\Handle.cs:line 238, Defaulting to admin credentials. [736.85 INFO] (SDKD log:137) info: Couchbase.KeyValue.CouchbaseCollection [0] [736.85 INFO] (SDKD log:137) Possible non-terminal error fetching CID. [736.85 INFO] (SDKD log:137) Couchbase.AuthenticationFailureException: Exception of type 'Couchbase.AuthenticationFailureException' was thrown. [736.85 INFO] (SDKD log:137) +++ Received exception of ID 0 [736.85 INFO] (SDKD log:137) ---------------------- Context Info -------------------------- [736.85 INFO] (SDKD log:137) {"DispatchedFrom":null,"DispatchedTo":null,"DocumentKey":"","ClientContextId":"1124","Cas":0,"Status":36,"BucketName":"default","CollectionName":null,"ScopeName":null,"Message":"KV Error: Unknown macro: {Name="EACCESS", Description="Not authorized for command", Attributes="support"} ","OpCode":"GetCidByName"} [736.85 INFO] (SDKD log:137) [736.85 INFO] (SDKD log:137) info: Couchbase.KeyValue.CouchbaseCollection [0] [736.85 INFO] (SDKD log:137) Collections (GET_CID) are not supported on this server version. And then the messages are far less frequent after that. I shall run the rest of the tests to confirm the fix.

            People

              jmorris Jeff Morris
              will.broadbelt Will Broadbelt
              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