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

Avoid invariant during assertIsPrimaryShardForDb

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 7.1.1, 7.2.0-rc0, 7.0.4
    • 7.2.0-rc0, 7.0.2, 7.1.0
    • None
    • Fully Compatible
    • ALL
    • v7.1, v7.0
    • Sharding EMEA 2023-10-30
    • 120
    • 2

    Description

      During assertIsPrimaryShardForDb, it may happen that the node’s cached database info is cleared. Therefore, we must not assume that _dbInfo from the dss is always set:

      const auto primaryShardId = scopedDss->_dbInfo->getPrimary();
      

      The goal of this ticket is to guarantee that is safe accessing the node's cached db info in order to check if the node is the db primary node.

      Attachments

        Activity

          People

            pol.pinol@mongodb.com Pol Pinol
            tommaso.tocci@mongodb.com Tommaso Tocci
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: