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

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

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 7.0.0-rc0
    • Affects Version/s: None
    • Component/s: Internal Code
    • None
    • Fully Compatible
    • ALL
    • Service Arch 2023-04-17
    • 2
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      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.

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

              Created:
              Updated:
              Resolved: