Uploaded image for project: 'WiredTiger'
  1. WiredTiger
  2. WT-14031

The op_timer_fired mechanism doesn't free application threads stuck in eviction after commit or rollback

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Cache and Eviction
    • Storage Engines
    • StorEng - Defined Pipeline

      Application threads pulled into eviction after commit or rollback via the __wt_evict_app_assist_worker_check cannot be freed from the eviction loop via __wt_op_timer_fired as it only fires if the transaction is running per it's implementation here:

      static WT_INLINE bool
      __wt_op_timer_fired(WT_SESSION_IMPL *session)
      {
          uint64_t diff, now;
      
          if (!F_ISSET(session->txn, WT_TXN_RUNNING) || session->operation_start_us == 0 ||
            session->operation_timeout_us == 0)
              return (false);
      
          now = __wt_clock(session);
          diff = WT_CLOCKDIFF_US(now, session->operation_start_us);
          return (diff > session->operation_timeout_us);
      }
      

      The WT_TXN_RUNNING flag is cleared by __txn_release which happens before the thread enters eviction. In the situation where the application thread is the MongoDB thread that goes around aborting transactions the server will get stuck as that thread will be held in eviction indefinitely.

            Assignee:
            backlog-server-storage-engines [DO NOT USE] Backlog - Storage Engines Team
            Reporter:
            luke.pearson@mongodb.com Luke Pearson
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: