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

Create a reader-optimized deferred reclamation primitive (hazard pointers)

    • Type: Icon: New Feature New Feature
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Internal Code
    • Server Programmability

      This API should be seen as a replacement for (roughly) atomic<shared_ptr<T>>, a mutex+shared_ptr<T> (which is how atomic<shared_ptr> is implemented) or places where we frequently take a mutex just to observe an object AND we release the mutex prior to acting on the observation.

      This should support:

      • Non-blocking reads: readers never block behind writers or other readers.
      • Reading stale values: readers may hold a reference to an earlier version of the object.
      • Writers to create a new version without blocking on readers to retire.
      • For efficiency, we should avoid having readers write to shared cache lines.

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

              Created:
              Updated: