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

Exhaustive find on config shard can return stale data

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.0.0-rc0, 7.3.0-rc3, 5.0.26, 6.0.15, 7.0.7
    • Affects Version/s: 7.0.6, 5.0.25, 6.0.14, 4.4.30
    • Component/s: None
    • None
    • Fully Compatible
    • ALL
    • v7.3, v7.0, v6.0, v5.0, v4.4
    • CAR Team 2024-02-05, CAR Team 2024-02-19
    • 105

      In order to populate the sharding caches we perform exhaustive find commands on the config shard. These finds are performed with majority readConcern and a minimum cluster time to ensure causality.

      However, doing so could cause the query to return invalid results with particularly slow machines as an internal snapshot refresh could make us ignore later documents if they got deleted. This is an issue because we transactionally modify multiple documents and the exhaustive find could return partially applied commits due to the refresh.
      For example:

      • Say we have two documents A0 and B0.
      • We start a scan here, read A0, and yield.
      • We update both transactionally to A1 and B1.
      • We refresh the scan snapshot and now read B1.
      • End result is A0, and B1.

      If B1 is a deletion and we expected to read B0 then the query would only return A.

            Assignee:
            jordi.olivares-provencio@mongodb.com Jordi Olivares Provencio
            Reporter:
            jordi.olivares-provencio@mongodb.com Jordi Olivares Provencio
            Votes:
            0 Vote for this issue
            Watchers:
            12 Start watching this issue

              Created:
              Updated:
              Resolved: