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

Refresh application thread snapshot when it is triggered to perform eviction.

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • WT11.2.0, 7.2.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Storage Engines
    • 8
    • TheMoon-StorEng - 2023-09-19, NachoCheese - 2023-10-03, Joker - StorEng - 2023-10-17, Asparagus-StorEng - 2023-10-31

      Application threads start to do eviction when the eviction triggers are reached. They use their own snapshot to do eviction. However, when their snapshot is old, it cannot make progress in eviction and throws ebusy.

           * If eviction didn't use any updates and didn't split or delete the page, it didn't make
           * progress. Give up rather than silently succeeding in doing no work: this way threads know to
           * back off forced eviction rather than spinning.
           * Do not return an error if we are syncing the file with eviction disabled or as part of a
           * checkpoint.
          if (ret == 0 && !(btree->evict_disabled > 0 || !F_ISSET(btree->dhandle, WT_DHANDLE_OPEN)) &&
            F_ISSET(r, WT_REC_EVICT) && !WT_PAGE_IS_INTERNAL(r->page) && r->multi_next == 1 &&
            F_ISSET(r, WT_REC_CALL_URGENT) && !r->update_used && r->cache_write_restore)
              ret = __wt_set_return(session, EBUSY);

      This sometimes cause the application thread to stuck in the eviction loop. It keeps doing eviction but not making any progress.

            ravi.giri@mongodb.com Ravi Giri
            chenhao.qu@mongodb.com Chenhao Qu
            0 Vote for this issue
            12 Start watching this issue