Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-49694

On a sharded cluster, nearest or hedged reads may not be routed to a near shard replica.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.4.1, 4.7.0
    • Component/s: None
    • Labels:
      None
    • Backwards Compatibility:
      Minor Change
    • Operating System:
      ALL
    • Backport Requested:
      v4.4
    • Steps To Reproduce:
      Hide

      I've attached a javascript test that logs the RTTs over the course of 20 pings. It shows 0 RTT reliably despite a failCommand fail point that should prevent that.

      Show
      I've attached a javascript test that logs the RTTs over the course of 20 pings. It shows 0 RTT reliably despite a failCommand fail point that should prevent that.
    • Linked BF Score:
      44

      Description

       

      Issue Status as of July 28, 2020

      ISSUE SUMMARY

      Due to an issue with reporting the round-trip time (RTT) of replica set members, on mongoS, "nearest" read preference and hedged reads do not determine the eligible nodes based on localThresholdMs.

      USER IMPACT

      On a sharded cluster, nearest reads or hedged reads are not necessarily routed to a near shard replica (that is, within 15ms round-trip time). These reads are instead dispatched to an arbitrary node, which can be more remote.

      WORKAROUNDS

      Installations with distributed sharded clusters that rely on read preference "nearest" should not upgrade to 4.4.0. Instead, upgrade to 4.4.1.

      AFFECTED VERSIONS

      This affects version 4.4.0.

      FIX VERSION

      This issue is corrected in MongoDB 4.4.1.

       

      Original Description

      When looking a substantial RTT for non-colocated hosts, I'm seeing clean .8 factor decreases on ping intervals which trends towards 0. I see that the factor is .2 from here. My conclusion is we're passing in RTT=0 for each update after the first.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              lamont.nelson Lamont Nelson
              Reporter:
              ben.caimano Benjamin Caimano
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              13 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: