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

Ensure all WT_SESSION API calls go through WiredTigerSession

    • Type: Icon: New Feature New Feature
    • Resolution: Fixed
    • Priority: Icon: Minor - P4 Minor - P4
    • 8.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • RSS Sydney
    • Fully Compatible
    • SleighTheDay - 2024-12-24, SongingMoose - 2025-01-07, NamePending - 2025-01-21, MooseOnTheLoose - 2025-02-04

      The WT_SESSION object is not thread safe. We’ll need to implement locking around calling methods on the WT_SESSION in the server as the rollback handler can try to call WT_SESSION::rollback_transaction() on a WT_SESSION concurrently. The server has a wrapper for WT_SESSION called WiredTigerSession. We can implement the equivalent WT_SESSION methods in this wrapper and add locking around the API calls to keep the locking internalized and only around the critical section. For the most part, only a single thread will be accessing the WT_SESSION at any given time, until its transaction needs to be rolled back by WiredTiger, typically under cache pressure. So we shouldn’t expect contention on a per-session lock during steady state.

       

            Assignee:
            nic.hollingum@mongodb.com Nic Hollingum
            Reporter:
            ruby.chen@mongodb.com Ruby Chen
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: