Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-24237

DCP stream names conflicting across different processes due to not seeding random number generator

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Fix
    • Major
    • None
    • master
    • cbdatasource
    • None

    Description

       

      I'm seeing a case where two Sync Gateway processes (running on different VMs) are trying to open DCP streams with the same name, and the root cause looks to be due to not seeding the random number generator in cbdatasource

       

      This is causing the DCPReceiver to have it's OnError() called back, which in the Sync Gateway case causes the database to go offline and certain functional tests to fail, which were passing previously when using a TAP feed.

       

      Sync Gateway 1 logs

      Sync Gateway 1 pcap

      Sync Gateway 2 logs

      Sync Gateway 2 pcap

       

      Note that in Sync Gateway 1 logs:

       

      2017-05-03 17:20:59.351125 I | Opening DCP connection to cbdatasource-380704bb7b4d7c03

      2017-05-03 17:21:00.402345 I | Opening DCP connection to cbdatasource-1408d2ac22c4d294

       

      and in Sync Gateway 2 logs:

       

      2017-05-03 17:21:01.114965 I | Opening DCP connection to cbdatasource-380704bb7b4d7c03

      2017-05-03 17:21:01.759772 I | Opening DCP connection to cbdatasource-1408d2ac22c4d294

       

      According to Dave Rigby: "it's certainly the case that a second DCP connection with the same key name in OPEN_CONNECTION will close the previous one".  

       

      Original sync gateway ticket: https://github.com/couchbase/sync_gateway/issues/2514

      Attachments

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

        Activity

          People

            steve Steve Yen
            traun Traun Leyden (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            10 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty