summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Hows <howsdav@gmail.com>2016-10-12 17:35:20 +1100
committerMichael Cahill <michael.cahill@mongodb.com>2016-10-12 17:35:20 +1100
commit9edac5dd7ba50e3a4f3a62c0aa971457d3ec3034 (patch)
tree2634d657f9a27811779204afd6cd08c466a8eaa6
parent72f4d89fbef3bb07b8ef3c0b8a00f758487af7f3 (diff)
downloadmongo-9edac5dd7ba50e3a4f3a62c0aa971457d3ec3034.tar.gz
WT-2965 Remove sleep and retry loop from __evict_exclusive (#3091)
-rw-r--r--src/evict/evict_page.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/src/evict/evict_page.c b/src/evict/evict_page.c
index 092f80cc000..3d1557e027e 100644
--- a/src/evict/evict_page.c
+++ b/src/evict/evict_page.c
@@ -31,23 +31,14 @@ __evict_exclusive_clear(WT_SESSION_IMPL *session, WT_REF *ref)
static inline int
__evict_exclusive(WT_SESSION_IMPL *session, WT_REF *ref)
{
- int loops;
-
WT_ASSERT(session, ref->state == WT_REF_LOCKED);
/*
* Check for a hazard pointer indicating another thread is using the
* page, meaning the page cannot be evicted.
*/
- for (loops = 0; loops < 10; loops++) {
- if (__wt_page_hazard_check(session, ref->page) == NULL)
- return (0);
- if (ref->page->read_gen != WT_READGEN_OLDEST &&
- ref->page->memory_footprint <
- S2BT(session)->split_deepen_min_child)
- break;
- __wt_sleep(0, WT_THOUSAND);
- }
+ if (__wt_page_hazard_check(session, ref->page) == NULL)
+ return (0);
WT_STAT_DATA_INCR(session, cache_eviction_hazard);
WT_STAT_CONN_INCR(session, cache_eviction_hazard);