Uploaded image for project: 'Couchbase Gateway'
  1. Couchbase Gateway
  2. CBG-3052

[3.1.1 Backport] cbgt panics when setting up import feed for server versions < 7.0

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 3.1.1
    • 3.1.0
    • SyncGateway
    • Security Level: Public
    • None
    • CBG Sprint 126
    • 1

    Description

      When running with a server version with no collections support cbgt panics during initialisation of dcp streams for import. The issue comes here in our code where we check for the bucket has collections support and as a result we disable the stream ID on dcp options -> https://github.com/couchbase/sync_gateway/blob/75def59e0d384c7660d754d83fc638e9110beefb/base/dcp_sharded.go#L333 as far as I can see this option is carries forward through gocb with the dcp component created indicating that the stream ID is disabled. Unfortunately cbgt doesn't check for this and assumes the streamID is there in the dcp stream options and thus we hit the panic. The problematic function -> https://github.com/couchbase/cbgt/blob/48f41f9f9d8529d8b72582a8bf6bb4aabd6bad79/feed_dcp_gocbcore.go#L115 which is called to open a stream https://github.com/couchbase/cbgt/blob/48f41f9f9d8529d8b72582a8bf6bb4aabd6bad79/feed_dcp_gocbcore.go#L978 and also called when closing streams https://github.com/couchbase/cbgt/blob/48f41f9f9d8529d8b72582a8bf6bb4aabd6bad79/feed_dcp_gocbcore.go#L847

       

      Filing this ticket to investigate with cbgt to see what our best option is (do we wait for a fix in cbgt) or do we have a viable workaround to implement inside sync gateway.

      Attachments

        Issue Links

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

          Activity

            People

              gregory.newmansmith Gregory Newman-Smith
              adamf Adam Fraser
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty