summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael Cahill <michael.cahill@mongodb.com>2016-09-26 12:57:50 +1000
committerAlex Gorrod <alexander.gorrod@mongodb.com>2016-09-26 12:57:50 +1000
commit5a26a11f0da1941b38ca34c3ba2a4e1265392049 (patch)
tree8c4f2baf477aebf6ebc68fea362c6943795ac9e3 /src
parentfca6813c068a38cd3c6ea7bb9d3525a827ff0c54 (diff)
downloadmongo-5a26a11f0da1941b38ca34c3ba2a4e1265392049.tar.gz
WT-2921 Reset the count when the last hazard pointer is cleared. (#3058)
Diffstat (limited to 'src')
-rw-r--r--src/support/hazard.c5
1 files 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);
}