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

SdamServerSelector sometimes doesn't fully respect client readPreference for config shard

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 7.0.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Sharding NYC
    • Fully Compatible
    • ALL
    • Sharding NYC 2023-04-17
    • 154

      Currently, the SdamServerSelector has the logic to ignore the minClusterTime in the readPreference given to it if the timestamp is not satisfiable. When constructing the effective readPreference, it only gives 'pref' to the constructor. Consequently, the other configurations such as 'tags', 'maxStalenessSeconds', and 'hedgingMode' all get lost.  For shard remote targeting at least, minClusterTime is only specified when the shard is the config shard. Prior to PM-2290, there probably isn't a case where the config server is targeted with readPreference that contains tags and so on. That might be why this issue never surfaced. Starting from PM-2290, this is a bug that needs to be addressed since it can result in the external client readPreference not being fully respected (as shown in BF-27925), 

            Assignee:
            wenqin.ye@mongodb.com Wenqin Ye
            Reporter:
            cheahuychou.mao@mongodb.com Cheahuychou Mao
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: