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

Race condition in $out cleanup of timeseries bucket

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 7.0.0, 8.0.0-rc0, 8.1.0-rc0
    • Component/s: None
    • None
    • Catalog and Routing
    • ALL
    • 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
    • 2

      In the presence of an error or simply when interrupted, $out cleans-up after itself in its destructor. If the output of $out was to a timeseries collection and the interrupt happened after the temporary rename, then it has to drop the buckets collection. This code assumes that the collection it is dropping is the same it created. However, between the rename and the drop the collection could've been dropped and re-created, thus it would be dropping an unrelated collection, leading to data loss. The goal of this ticket is to fix this race condition, perhaps by dropping specifying the original UUID.

            Assignee:
            Unassigned Unassigned
            Reporter:
            aitor.esteve@mongodb.com Aitor Esteve Alvarado
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: