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

HTTPConfigController doLoop not exiting on agent close

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • Major
    • None
    • core-10.2.4
    • core-library
    • None
    • 1
    • SDK24

    Description

      We're observing that an HTTPConfigController doLoop is remaining active after an agent is closed.  If the bucket that was previously associated with that agent is deleted, we get ongoing log spam like:

       gocb: Failed to connect to host, bad bucket.

      When the agent is closed, we observe logging like:

      gocb+: Config seen but CCCP poller exited, restarting CCCP poller.
      gocb+: CCCP Looper starting.

      If we then delete the bucket, we get the 'bad bucket' logging every 10s.

      Looking at the code, it seems like what might be happening is:

      • agent.Close() is calling pollerController.Stop()
      • pollerController.Stop() only calls stop for the activeController (which is CCCP at the time)
      • the pollerController run loop falls back to http polling, which restarts the baseHTTPConfigController doLoop
      • hcc.looperStopSig was never closed (because it wasn't active when Stop was called), so that loop keeps running

      I don't have a completely isolated repro case, but can reproduce this consistently when using Sync Gateway and cbgt, so can test a fix if needed.

      Attachments

        Issue Links

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

          Activity

            People

              adamf Adam Fraser
              adamf Adam Fraser
              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