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

ephemeralForTest cursors need to be made thread_safe

    • Type: Icon: Bug Bug
    • Resolution: Works as Designed
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Storage
    • Labels:
      None
    • ALL
    • Execution Team 2019-11-04
    • 14

      The EphemeralForTestRecordStore uses a mutex to control access to its _data->records member. However, EphemeralForTestRecordStore::Cursor and ::ReverseCursor get a direct reference to this member and do not lock the mutex when accessing it.

      Furthermore, these classes cache an iterator to the structure, which is a std::map; in the case of a rollback these iterators will be invalid, and in the case of a delete they might be.

            Assignee:
            milkie@mongodb.com Eric Milkie
            Reporter:
            matthew.russotto@mongodb.com Matthew Russotto
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: