Uploaded image for project: 'Couchbase Go SDK'
  1. Couchbase Go SDK
  2. GOCBC-248

HELO version string seems incorrect

    XMLWordPrintable

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.3.0
    • 1.3.3
    • library
    • None

    Description

      The SDK HELO version seems incorrect.

      Steps to reproduce:

      1. Spin up a one node cluster with the default bucket
      2. Use the following Go code

        package main
         
        import (
            "fmt"
            "gopkg.in/couchbase/gocb.v1"
        )
         
        type User struct {
            Id string `json:"uid"`
            Email string `json:"email"`
            Interests []string `json:"interests"`
        }
         
        func main() {
                gocb.SetLogger(gocb.DefaultStdioLogger())
                cluster, _ := gocb.Connect("couchbase://localhost")
                bucket, _ := cluster.OpenBucket("default", "")
                bucket.Upsert("u:kingarthur",
                        User{
                                Id: "kingarthur",
                                Email: "kingarthur@couchbase.com",
                                Interests: []string{"Holy Grail", "African Swallows"},
                        }, 0)
                var inUser User
                bucket.Get("u:kingarthur", &inUser)
                fmt.Printf("User: %v\n", inUser)
        }
        

      3. build and execute
      4. Tail the memcached.log:

        2017-11-10T18:26:58.200201Z NOTICE 43: HELO [gocb/v7.0.5] [ 10.111.163.1:64882 - 10.111.163.101:11207 ]                                                                             
        2017-11-10T18:26:58.205011Z WARNING 43 Closing connection [ 10.111.163.1:64882 - 10.111.163.101:11207 ] due to read error: Connection reset by peer     
        

      As you can see the HELO version of the SDK is gocb/v7.0.5 I was expecting 1.30, as I believe that is the SDK version being used.

      Attachments

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

        Activity

          pvarley Patrick Varley created issue -
          pvarley Patrick Varley made changes -
          Field Original Value New Value
          Description The log output does not mention the version of the SDK being used.

          +Steps to reproduce:+
          # Spin up a one node cluster with the default bucket
          # Use the following Go code
          {code}
          package main

          import (
              "fmt"
              "gopkg.in/couchbase/gocb.v1"
          )

          type User struct {
              Id string `json:"uid"`
              Email string `json:"email"`
              Interests []string `json:"interests"`
          }

          func main() {
                  gocb.SetLogger(gocb.DefaultStdioLogger())
                  cluster, _ := gocb.Connect("couchbase://localhost")
                  bucket, _ := cluster.OpenBucket("default", "")
                  bucket.Upsert("u:kingarthur",
                          User{
                                  Id: "kingarthur",
                                  Email: "kingarthur@couchbase.com",
                                  Interests: []string{"Holy Grail", "African Swallows"},
                          }, 0)
                  var inUser User
                  bucket.Get("u:kingarthur", &inUser)
                  fmt.Printf("User: %v\n", inUser)
          }
          {code}
          # build and execute the output is as follows:
          {noformat}
          GOCB 18:26:58.146810 agent.go:477: Attempting to connect...
          GOCB 18:26:58.147015 agent.go:480: Trying server at localhost:11210
          GOCB 18:26:58.147027 agent.go:487: Trying to connect
          GOCB 18:26:58.152967 agentrouting.go:52: Fetching cluster client data
          GOCB 18:26:58.153358 agentrouting.go:111: Authenticating...
          GOCB 18:26:58.153657 agent.go:508: Attempting to request CCCP configuration
          GOCB 18:26:58.155033 agent.go:543: Successfully connected
          GOCB 18:26:58.155149 agentrouting.go:217: Switching routing data (update)...
          GOCB 18:26:58.155215 agentrouting.go:218: New Routing Data:
          Revision ID: 14
          Client Multiplexer: Pipeline 0:
              Address: localhost:11210
              Max Clients: 1
              Num Clients: 0
              Max Items: 2048
              Op Queue:
                Num Items: 0
                Is Open: true
            Dead Pipeline:
              Dead-Server Queue
              Op Queue:
                Num Items: 0
                Is Open: true
                                                                                                    
          Capi Eps:
            - http://localhost:8092/test
          Mgmt Eps:
            - https://localhost:8091
          N1ql Eps:
          FTS Eps:
          Source Data: *
          GOCB 18:26:58.155305 memdclient.go:154: memdClient read failure: read tcp 10.111.163.1:64881->10.111.163.101:11210: use of closed network connection
          GOCB 18:26:58.155325 memdclient.go:194: Failed to shut down client connection (tls: use of closed connection)
          GOCB 18:26:58.155341 memdpipeline.go:266: Pipeline Client `0xc420227380` preparing for new client loop
          GOCB 18:26:58.155368 memdpipeline.go:273: Pipeline Client `0xc420227380` is on parent: 0xc4200814f0
          GOCB 18:26:58.155376 memdpipeline.go:279: Pipeline Client `0xc420227380` retrieving new client connection
          GOCB 18:26:58.155327 agent.go:410: CCCP Looper starting.
          GOCB 18:26:58.160200 agentrouting.go:52: Fetching cluster client data
          GOCB 18:26:58.161386 agentrouting.go:111: Authenticating...
          GOCB 18:26:58.161701 memdpipeline.go:286: Pipeline Client `0xc420227380` starting new client loop
          GOCB 18:26:58.161724 memdpipeline.go:207: Pipeline `localhost:11210/0xc420227380` IO loop starting...
          GOCB 18:26:58.161733 memdpipeline.go:212: Pipeline `localhost:11210/0xc420227380` fetching new consumer
          GOCB 18:26:58.161754 memdpipeline.go:190: Pipeline `localhost:11210/0xc420227380` client watcher starting...
          User: {kingarthur kingarthur@couchbase.com [Holy Grail African Swallows]}
          {noformat}

          As you can see the version of the SDK is not printed in the logs.
          The SDK HELO version seems incorrect.

          +Steps to reproduce:+
          # Spin up a one node cluster with the default bucket
          # Use the following Go code
          {code}
          package main

          import (
              "fmt"
              "gopkg.in/couchbase/gocb.v1"
          )

          type User struct {
              Id string `json:"uid"`
              Email string `json:"email"`
              Interests []string `json:"interests"`
          }

          func main() {
                  gocb.SetLogger(gocb.DefaultStdioLogger())
                  cluster, _ := gocb.Connect("couchbase://localhost")
                  bucket, _ := cluster.OpenBucket("default", "")
                  bucket.Upsert("u:kingarthur",
                          User{
                                  Id: "kingarthur",
                                  Email: "kingarthur@couchbase.com",
                                  Interests: []string{"Holy Grail", "African Swallows"},
                          }, 0)
                  var inUser User
                  bucket.Get("u:kingarthur", &inUser)
                  fmt.Printf("User: %v\n", inUser)
          }
          {code}
          # build and execute
          # Tail the memcached.log:
          {noformat}
          2017-11-10T18:26:58.200201Z NOTICE 43: HELO [gocb/v7.0.5] [ 10.111.163.1:64882 - 10.111.163.101:11207 ]
          2017-11-10T18:26:58.205011Z WARNING 43 Closing connection [ 10.111.163.1:64882 - 10.111.163.101:11207 ] due to read error: Connection reset by peer
          {noformat}

          As you can see the HELO version of the SDK is gocb/v7.0.5 I was expecting 1.30, as I believe that is the SDK I'm using.
          pvarley Patrick Varley made changes -
          Description The SDK HELO version seems incorrect.

          +Steps to reproduce:+
          # Spin up a one node cluster with the default bucket
          # Use the following Go code
          {code}
          package main

          import (
              "fmt"
              "gopkg.in/couchbase/gocb.v1"
          )

          type User struct {
              Id string `json:"uid"`
              Email string `json:"email"`
              Interests []string `json:"interests"`
          }

          func main() {
                  gocb.SetLogger(gocb.DefaultStdioLogger())
                  cluster, _ := gocb.Connect("couchbase://localhost")
                  bucket, _ := cluster.OpenBucket("default", "")
                  bucket.Upsert("u:kingarthur",
                          User{
                                  Id: "kingarthur",
                                  Email: "kingarthur@couchbase.com",
                                  Interests: []string{"Holy Grail", "African Swallows"},
                          }, 0)
                  var inUser User
                  bucket.Get("u:kingarthur", &inUser)
                  fmt.Printf("User: %v\n", inUser)
          }
          {code}
          # build and execute
          # Tail the memcached.log:
          {noformat}
          2017-11-10T18:26:58.200201Z NOTICE 43: HELO [gocb/v7.0.5] [ 10.111.163.1:64882 - 10.111.163.101:11207 ]
          2017-11-10T18:26:58.205011Z WARNING 43 Closing connection [ 10.111.163.1:64882 - 10.111.163.101:11207 ] due to read error: Connection reset by peer
          {noformat}

          As you can see the HELO version of the SDK is gocb/v7.0.5 I was expecting 1.30, as I believe that is the SDK I'm using.
          The SDK HELO version seems incorrect.

          +Steps to reproduce:+
          # Spin up a one node cluster with the default bucket
          # Use the following Go code
          {code}
          package main

          import (
              "fmt"
              "gopkg.in/couchbase/gocb.v1"
          )

          type User struct {
              Id string `json:"uid"`
              Email string `json:"email"`
              Interests []string `json:"interests"`
          }

          func main() {
                  gocb.SetLogger(gocb.DefaultStdioLogger())
                  cluster, _ := gocb.Connect("couchbase://localhost")
                  bucket, _ := cluster.OpenBucket("default", "")
                  bucket.Upsert("u:kingarthur",
                          User{
                                  Id: "kingarthur",
                                  Email: "kingarthur@couchbase.com",
                                  Interests: []string{"Holy Grail", "African Swallows"},
                          }, 0)
                  var inUser User
                  bucket.Get("u:kingarthur", &inUser)
                  fmt.Printf("User: %v\n", inUser)
          }
          {code}
          # build and execute
          # Tail the memcached.log:
          {noformat}
          2017-11-10T18:26:58.200201Z NOTICE 43: HELO [gocb/v7.0.5] [ 10.111.163.1:64882 - 10.111.163.101:11207 ]
          2017-11-10T18:26:58.205011Z WARNING 43 Closing connection [ 10.111.163.1:64882 - 10.111.163.101:11207 ] due to read error: Connection reset by peer
          {noformat}

          As you can see the HELO version of the SDK is gocb/v7.0.5 I was expecting 1.30, as I believe that is the SDK version being used.

          Hey Patrick Varley,

          The Go SDK is actually made up of two somewhat independently developed projects, gocbcore which implements all of the connection, protocol and configuration management, as well as gocb on top which provides a more sane API for developers to use.  The version which is reported to the server is the gocbcore version (as this is the one which would actually impact the behaviour of the client).  Note that the reason we cannot send the gocb version is that there is no way to map a specific gocb version to a specific gocbcore version due to how Go's package management works.  For instance, if you checked out gocb last month, you would get gocb.v1.3.0 and gocbcore v7.0.4.  However, doing the exact same installation today would yield instead gocb.v1.3.0 and gocbcore v7.0.5.  Note that the gocb version hasn't been updated, but gocbcore underneath has been.

          Cheers, Brett

          brett19 Brett Lawson added a comment - Hey Patrick Varley , The Go SDK is actually made up of two somewhat independently developed projects, gocbcore which implements all of the connection, protocol and configuration management, as well as gocb on top which provides a more sane API for developers to use.  The version which is reported to the server is the gocbcore version (as this is the one which would actually impact the behaviour of the client).  Note that the reason we cannot send the gocb version is that there is no way to map a specific gocb version to a specific gocbcore version due to how Go's package management works.  For instance, if you checked out gocb last month, you would get gocb.v1.3.0 and gocbcore v7.0.4.  However, doing the exact same installation today would yield instead gocb.v1.3.0 and gocbcore v7.0.5.  Note that the gocb version hasn't been updated, but gocbcore underneath has been. Cheers, Brett
          brett19 Brett Lawson made changes -
          Resolution Incomplete [ 4 ]
          Status New [ 10003 ] Resolved [ 5 ]

          Surely the correct thing to do would be to report both modules?

          pvarley Patrick Varley added a comment - Surely the correct thing to do would be to report both modules?
          pvarley Patrick Varley made changes -
          Resolution Incomplete [ 4 ]
          Status Resolved [ 5 ] Reopened [ 4 ]
          brett19 Brett Lawson added a comment -

          Hey Patrick,

          What would be the benefit of this?  The gocb library doesn't have any tangible impact on the clients behavior, its simply a forwarding layer.

          Cheers, Brett

          brett19 Brett Lawson added a comment - Hey Patrick, What would be the benefit of this?  The gocb library doesn't have any tangible impact on the clients behavior, its simply a forwarding layer. Cheers, Brett
          brett19 Brett Lawson added a comment -

          Closing this for now, please feel free to reopen it if there is some support use for this!

          brett19 Brett Lawson added a comment - Closing this for now, please feel free to reopen it if there is some support use for this!
          brett19 Brett Lawson made changes -
          Resolution Fixed [ 1 ]
          Status Reopened [ 4 ] Resolved [ 5 ]

          What would be the benefit of this? The gocb library doesn't have any tangible impact on the clients behavior, its simply a forwarding layer.

          So we can identify problematic SDK versions and proactively inform customer.

          From a end user DBA point of view they can see what clients are connected and what versions they are on.

          pvarley Patrick Varley added a comment - What would be the benefit of this? The gocb library doesn't have any tangible impact on the clients behavior, its simply a forwarding layer. So we can identify problematic SDK versions and proactively inform customer. From a end user DBA point of view they can see what clients are connected and what versions they are on.
          pvarley Patrick Varley made changes -
          Resolution Fixed [ 1 ]
          Status Resolved [ 5 ] Reopened [ 4 ]
          pvarley Patrick Varley added a comment - - edited

          This is what the other SDKs too:

          • Java SDK sets both the core and top level client versions in the HELO
          • Python SDK sets the libcouchbase and python SDK versions in the HELO
          pvarley Patrick Varley added a comment - - edited This is what the other SDKs too: Java SDK sets both the core and top level client versions in the HELO Python SDK sets the libcouchbase and python SDK versions in the HELO
          brett19 Brett Lawson made changes -
          Fix Version/s 1.3.2 [ 15035 ]
          brett19 Brett Lawson made changes -
          Resolution Fixed [ 1 ]
          Status Reopened [ 4 ] Resolved [ 5 ]

          Build couchbase-server-5.1.0-5537 contains gocbcore commit a4afac19160b9b2d88320210d07fd5c55f8c385d with commit message:
          GOCBC-248: Uniquely identify gocb version along with core version.
          https://github.com/couchbase/gocbcore/commit/a4afac19160b9b2d88320210d07fd5c55f8c385d

          build-team Couchbase Build Team added a comment - Build couchbase-server-5.1.0-5537 contains gocbcore commit a4afac19160b9b2d88320210d07fd5c55f8c385d with commit message: GOCBC-248 : Uniquely identify gocb version along with core version. https://github.com/couchbase/gocbcore/commit/a4afac19160b9b2d88320210d07fd5c55f8c385d

          Build couchbase-server-5.5.0-1708 contains gocbcore commit a4afac19160b9b2d88320210d07fd5c55f8c385d with commit message:
          GOCBC-248: Uniquely identify gocb version along with core version.
          https://github.com/couchbase/gocbcore/commit/a4afac19160b9b2d88320210d07fd5c55f8c385d

          build-team Couchbase Build Team added a comment - Build couchbase-server-5.5.0-1708 contains gocbcore commit a4afac19160b9b2d88320210d07fd5c55f8c385d with commit message: GOCBC-248 : Uniquely identify gocb version along with core version. https://github.com/couchbase/gocbcore/commit/a4afac19160b9b2d88320210d07fd5c55f8c385d

          Build couchbase-server-5.5.0-2097 contains gocb commit 77854e87edf350a2eedd1d29ad2998a1dc9b47da with commit message:
          GOCBC-248: Uniquely identify gocb version to the core.
          https://github.com/couchbase/gocb/commit/77854e87edf350a2eedd1d29ad2998a1dc9b47da

          build-team Couchbase Build Team added a comment - Build couchbase-server-5.5.0-2097 contains gocb commit 77854e87edf350a2eedd1d29ad2998a1dc9b47da with commit message: GOCBC-248 : Uniquely identify gocb version to the core. https://github.com/couchbase/gocb/commit/77854e87edf350a2eedd1d29ad2998a1dc9b47da

          Build couchbase-server-5.5.0-2114 contains gocb commit 77854e87edf350a2eedd1d29ad2998a1dc9b47da with commit message:
          GOCBC-248: Uniquely identify gocb version to the core.
          https://github.com/couchbase/gocb/commit/77854e87edf350a2eedd1d29ad2998a1dc9b47da

          build-team Couchbase Build Team added a comment - Build couchbase-server-5.5.0-2114 contains gocb commit 77854e87edf350a2eedd1d29ad2998a1dc9b47da with commit message: GOCBC-248 : Uniquely identify gocb version to the core. https://github.com/couchbase/gocb/commit/77854e87edf350a2eedd1d29ad2998a1dc9b47da

          Build sync_gateway-2.1.0-839 contains gocb commit 77854e87edf350a2eedd1d29ad2998a1dc9b47da with commit message:
          GOCBC-248: Uniquely identify gocb version to the core.
          https://github.com/couchbase/gocb/commit/77854e87edf350a2eedd1d29ad2998a1dc9b47da

          build-team Couchbase Build Team added a comment - Build sync_gateway-2.1.0-839 contains gocb commit 77854e87edf350a2eedd1d29ad2998a1dc9b47da with commit message: GOCBC-248 : Uniquely identify gocb version to the core. https://github.com/couchbase/gocb/commit/77854e87edf350a2eedd1d29ad2998a1dc9b47da

          Build sync_gateway-2.1.0-839 contains gocbcore commit a4afac19160b9b2d88320210d07fd5c55f8c385d with commit message:
          GOCBC-248: Uniquely identify gocb version along with core version.
          https://github.com/couchbase/gocbcore/commit/a4afac19160b9b2d88320210d07fd5c55f8c385d

          build-team Couchbase Build Team added a comment - Build sync_gateway-2.1.0-839 contains gocbcore commit a4afac19160b9b2d88320210d07fd5c55f8c385d with commit message: GOCBC-248 : Uniquely identify gocb version along with core version. https://github.com/couchbase/gocbcore/commit/a4afac19160b9b2d88320210d07fd5c55f8c385d

          Build couchbase-server-5.1.2-6014 contains gocb commit 77854e8 with commit message:
          GOCBC-248: Uniquely identify gocb version to the core.

          build-team Couchbase Build Team added a comment - Build couchbase-server-5.1.2-6014 contains gocb commit 77854e8 with commit message: GOCBC-248 : Uniquely identify gocb version to the core.

          Build couchbase-server-5.1.1-5904 contains gocb commit 77854e8 with commit message:
          GOCBC-248: Uniquely identify gocb version to the core.

          build-team Couchbase Build Team added a comment - Build couchbase-server-5.1.1-5904 contains gocb commit 77854e8 with commit message: GOCBC-248 : Uniquely identify gocb version to the core.

          People

            brett19 Brett Lawson
            pvarley Patrick Varley
            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