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

Avoid invariant during assertIsPrimaryShardForDb

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

      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.

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

              Created:
              Updated:
              Resolved: