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

Accessing `MirrorMaestroImpl::_random` should be thread-safe

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 7.0.0-rc0
    • None
    • Internal Code
    • None
    • Fully Compatible
    • ALL
    • Service Arch 2023-04-17
    • 2

    Description

      SERVER-72373 modified MirrorMaestro to use PseudoRandom to pick a normalized subset of eligible hosts. PseudoRandom, however, is not thread-safe and concurrent accesses could result in read-after-write data races. Since MirrorMaestro is accessing PseudoRandom through executor threads, we can either use a synchronization primitive or make instances of PseudoRandom thread-local to avoid read-after-write races.

      Attachments

        Activity

          People

            amirsaman.memaripour@mongodb.com Amirsaman Memaripour
            amirsaman.memaripour@mongodb.com Amirsaman Memaripour
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: