diff options
Diffstat (limited to 'src/third_party/wiredtiger/src/evict/evict_lru.c')
-rw-r--r-- | src/third_party/wiredtiger/src/evict/evict_lru.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/third_party/wiredtiger/src/evict/evict_lru.c b/src/third_party/wiredtiger/src/evict/evict_lru.c index 749050edf6e..bf5b10c6bb6 100644 --- a/src/third_party/wiredtiger/src/evict/evict_lru.c +++ b/src/third_party/wiredtiger/src/evict/evict_lru.c @@ -2224,6 +2224,7 @@ __evict_page(WT_SESSION_IMPL *session, bool is_server) WT_REF *ref; WT_TRACK_OP_DECL; uint64_t time_start, time_stop; + uint32_t flags; uint8_t previous_state; bool app_timer; @@ -2236,6 +2237,8 @@ __evict_page(WT_SESSION_IMPL *session, bool is_server) cache = S2C(session)->cache; time_start = time_stop = 0; + flags = 0; + /* * An internal session flags either the server itself or an eviction worker thread. */ @@ -2254,6 +2257,10 @@ __evict_page(WT_SESSION_IMPL *session, bool is_server) } } + /* Set a flag to indicate that either eviction server or worker thread is evicting the page. */ + if (F_ISSET(session, WT_SESSION_INTERNAL)) + LF_SET(WT_REC_EVICTION_THREAD); + /* * In case something goes wrong, don't pick the same set of pages every time. * @@ -2263,7 +2270,7 @@ __evict_page(WT_SESSION_IMPL *session, bool is_server) */ __wt_cache_read_gen_bump(session, ref->page); - WT_WITH_BTREE(session, btree, ret = __wt_evict(session, ref, previous_state, 0)); + WT_WITH_BTREE(session, btree, ret = __wt_evict(session, ref, previous_state, flags)); (void)__wt_atomic_subv32(&btree->evict_busy, 1); |