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

[Backport MB-51063 to 7.1.2] [CBSE] PickRandom: filterByTiming: Dont refetch the load stats again after leastLoad value is calculated

    XMLWordPrintable

Details

    • Triaged
    • 1
    • Unknown

    Description

      In PickRandom function when we are filtering by scan timings in filterByTiming

       

      ...
      // compute replica with least load.
      sort.Float64s(loadList)
      leastLoad := loadList[0]//
       
      // Filter inst based on load
      //
      for i, instId := range replicas {
          if load, ok := currmeta.loads[common.IndexInstId(instId)]; ok {
              if n, ok := load.getLoad(common.PartitionId(partnId)); ok { 
      ...

      Load stats can change after the computation of the leastLoad and if they change beyond the equivalenceFactor we might endup in not picking any replica to serve the scan

      So we should be using the same loadValues that are used to calculate the leastLoad for filtering the replicas.

       

      Attachments

        Issue Links

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

          Activity

            People

              sai.teja Sai Krishna Teja
              amit.kulkarni Amit Kulkarni
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty