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

Remove and ban any write to collection instance in commit handlers

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 7.2.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Storage Execution NAMER
    • Fully Compatible
    • Execution Team 2023-06-12, Execution NAMR Team 2023-06-26, Execution NAMR Team 2023-10-02, Execution NAMR Team 2023-10-16

      It is not safe to write to collection or index catalog entry instances in commit handlers. Cloned instances as part of DDL operations can be returned to other threads doing lock-free reads after the DDL operation is committed to the storage engine but before its commit handlers have run. Any such write requires synchronization and goes against the design philosophy that readers should obtain immutable instances that are fully in sync with the opened storage snapshot.

      To help find and prevent future misuse we should consider publishing new collection instances in the first commit handler rather than the last.

            Assignee:
            henrik.edin@mongodb.com Henrik Edin
            Reporter:
            henrik.edin@mongodb.com Henrik Edin
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: