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

Avoid resetting `ServiceContext` members in `db_repl_test`

    • Type: Icon: Bug Bug
    • Resolution: Won't Do
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Internal Code
    • Labels:
      None
    • ALL

      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 db_repl_test and fix any set-after-get for ServiceContext members (e.g., here).

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

              Created:
              Updated:
              Resolved: