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

Improvement on RemoteClusterService.refresh()

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Critical
    • 5.5.0
    • 5.0.0
    • XDCR
    • None
    • Untriaged
    • Unknown

    Description

      1) Currently, the function iterates through an array of connectionstr as a rotating buffer at random starting point.   The code could be more streamline if there is a utility that returned a random-swapped connectionstr array.     refresh() function can then just simply iterate through this array.

      2) replaceRefHostName() share a lot of code path with refresh().    And replaceRefHostName() is only called from refresh().   We need to see why we have to (seemingly) repeating some of the work twice.  Specifiically, why the nodeList retrieved inside refresh() is not sufficient to update ref.HostName (and we need a separate function to update replaceRefHostName).

      3) We also have to find out why we need to periodically refresh remoteClusterRef.  Shouldn't refresh be driven from target topology change (on demand).

      Attachments

        Activity

          People

            neil.huang Neil Huang
            jliang John Liang
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              PagerDuty