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

Secondary read pref with tag can end up selecting no nodes on retry

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.5.1
    • Affects Version/s: None
    • Component/s: Internal Client
    • Labels:
      None
    • ALL

      Example case:

      2 node replica set:
      primary tag:

      { dc: 'sf' }

      secondary tag:

      { dc: 'ny' }

      read pref setting:
      mode: secondary
      tags: [

      { dc: 'ny' }

      ]

      If the secondary was down and the went up again, the replica set connection object will attempt to select nodes again (since the first try gave us nothing due to the node being down and marked as bad). However, the iterator for the tag was already moved on the first attempt and the retry would end up not checking the nodes because it already depleted the tags on the first attempt.

        1. read_pref_cmd.txt
          124 kB
          Randolph Tan

            Assignee:
            randolph@mongodb.com Randolph Tan
            Reporter:
            randolph@mongodb.com Randolph Tan
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: