From 5a26a11f0da1941b38ca34c3ba2a4e1265392049 Mon Sep 17 00:00:00 2001 From: Michael Cahill Date: Mon, 26 Sep 2016 12:57:50 +1000 Subject: WT-2921 Reset the count when the last hazard pointer is cleared. (#3058) --- src/support/hazard.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/support/hazard.c b/src/support/hazard.c index 8ac8f5f9f6d..46b63ac6129 100644 --- a/src/support/hazard.c +++ b/src/support/hazard.c @@ -166,9 +166,10 @@ __wt_hazard_clear(WT_SESSION_IMPL *session, WT_PAGE *page) /* * If this was the last hazard pointer in the session, - * we may need to update our transactional context. + * reset the size so that checks can skip this session. */ - --session->nhazard; + if (--session->nhazard == 0) + WT_PUBLISH(session->hazard_size, 0); return (0); } -- cgit v1.2.1