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

Make analyzeShardKey command respect client readPreference in all steps of metrics calculation

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 7.0.0-rc0
    • None
    • None
    • None
    • Fully Compatible
    • ALL
    • Sharding NYC 2023-03-06
    • 154

    Description

      Currently, mongos internally sets the readPreference to "secondaryPreferred" when forward the command to a shard. That is the readPreference that is used for all steps of metrics calculation (i.e. for the internal aggregate commands). Users may want to specify running the analyzeShardKey command on nodes with a certain tag (e.g analytics nodes), therefore mongos should not ignore the readPreference specified by the client. However, if the readPreference is not specified, it should continue to use readPreference "secondaryPreferred" instead of the parser default which is "primary".  

      Attachments

        Activity

          People

            cheahuychou.mao@mongodb.com Cheahuychou Mao
            cheahuychou.mao@mongodb.com Cheahuychou Mao
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: