-
Type: Build Failure
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
3
-
Storage - Ra 2020-07-13
WiredTiger has a mode of eviction that will restore updates that can't be evicted in the cache as a last step. There are some pathological cases where we successfully complete an eviction, but restore all of the updates at the end.
There is no use in doing that eviction in the first place - it requires exclusive access to the page, but doesn't reduce the amount of cache pressure. We should track when an update-restore eviction happens without any net benefit, and avoid retrying that eviction again until it's likely to have a different outcome.
We used to have functionality that did that, but it was removed when durable history was implemented. The check should look something like:
@@ -193,6 +193,19 @@ __reconcile(WT_SESSION_IMPL *session, WT_REF *ref, WT_SALVAGE_COOKIE *salvage, u if (F_ISSET(r, WT_REC_EVICT) && !WT_IS_HS(btree)) __wt_cache_update_hs_score(session, r->updates_seen, r->updates_unstable); + /* + * 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. + */ + WT_STAT_CONN_INCR(session, cache_eviction_point_a); + if (/* false && */ F_ISSET(r, WT_REC_EVICT) && !WT_PAGE_IS_INTERNAL(r->page) && r->multi_next == 1 && + !r->update_used) { + WT_STAT_CONN_INCR(session, cache_eviction_point_f); + //__wt_verbose(session, WT_VERB_ERROR_RETURNS, "%s: %d Error: %d", __func__, __LINE__, EBUSY); + ret = EBUSY; + } @@ -386,6 +386,10 @@ __wt_rec_upd_select(WT_SESSION_IMPL *session, WT_RECONCILE *r, WT_INSERT *ins, v return (__wt_set_return(session, EBUSY)); } + /* If an update was selected, record that we're making progress. */ + if (upd != NULL) + r->update_used = true; +
It might need to be enhanced to handle the case where timestamps aren't being used more elegantly (see WT-6484).
- is depended on by
-
SERVER-48395 Extended stalls during heavy insert workload
- Closed
- related to
-
WT-6444 Abort a transaction if it is force evicting and oldest
- Closed