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

Eviction preventing the fast path for read-only workloads in __wt_txn_refresh.

    • Type: Icon: Task Task
    • Resolution: Done
    • WT2.1
    • Affects Version/s: None
    • Component/s: None
    • None

      The recent fix for issue WT-777 works really well. However, I realized that when there are evictions happening, the fast path (the if-statement below) is not triggered and performance sucks.

         if (get_snapshot &&
             txn->id == max_id &&
             txn->snapshot_count == 0 &&
             txn->snap_min == snap_min &&
             TXNID_LE(prev_oldest_id, snap_min)) {
             /* If nothing has changed since last time, we're done. */
             txn_state->snap_min = txn->snap_min;
             if (txn_global->scan_count == 0 &&
                 txn_global->oldest_id == prev_oldest_id)
                 return;
         }
      

      There are multiple reasons: either get_snapshot is equal to 0 (because of a call __wt_txn_update_oldest from __wt_evict_page) or txn_global->scan_count is not equal to zero.

      Michael said: OK, I think this part is easy to fix and I'll push a change shortly. We can avoid incrementing scan count if there is no chance of updating the oldest ID.

            Assignee:
            fedorova Alexandra (Sasha) Fedorova
            Reporter:
            fedorova Alexandra (Sasha) Fedorova
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: