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

Avoid resetting `ServiceContext` members in `KeyGeneratorUpdateTest`

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Won't Do
    • None
    • None
    • Internal Code
    • None
    • ALL

    Description

      SERVER-51055 aims to ensure setting/getting ServiceContext members (e.g., _fastClockSource) is thread-safe. Resetting a member after reading it, however, violates this guarantee and is not a safe practice. This behavior, even in the context of a single-threaded program, could introduce memory corruptions as an earlier reference to the member (e.g., acquired through getFastClockSource) will be invalidated by resetting the member (e.g., setFastClockSource).

      This ticket should analyze KeyGeneratorUpdateTest and fix any set-after-get for ServiceContext members (e.g., here).

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: