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

Race condition between $out to timeseries and shard collection

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.1.0-rc0
    • Affects Version/s: 7.0.0, 7.3.0-rc0, 8.0.0-rc0
    • Component/s: None
    • None
    • Catalog and Routing
    • Fully Compatible
    • ALL
    • v8.0, v7.3
    • CAR Team 2024-06-10, CAR Team 2024-07-08, CAR Team 2024-07-22, CAR Team 2024-08-05, CAR Team 2024-08-19, CAR Team 2024-09-02, CAR Team 2024-09-16, CAR Team 2024-09-30, CAR Team 2024-10-14, CAR Team 2024-10-28
    • 200
    • 3

      At the end of a $out operation, the temporary collection is renamed to the output namespace. For timeseries collections it is the buckets collection what gets renamed.

      It would be wrong that this rename causes a buckets collection test.system.buckets.foo to appear when there's already a test.foo sharded collection. To prevent that, _internalRenameIfOptionsAndIndexesMatch has a check to ensure that the destination collection is not sharded. However, the implementation (here on master, andhere on v7.0) of it is wrong for timeseries: It only checks that the buckets collection is not sharded, rather than the undelying view namespace

        1. 0001-Repro-SERVER-82085.patch
          2 kB
          Jordi Serra Torrens

            Assignee:
            aitor.esteve@mongodb.com Aitor Esteve Alvarado
            Reporter:
            jordi.serra-torrens@mongodb.com Jordi Serra Torrens
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: