diff options
author | Michael Cahill <michael.cahill@mongodb.com> | 2016-09-26 12:57:50 +1000 |
---|---|---|
committer | Alex Gorrod <alexander.gorrod@mongodb.com> | 2016-09-26 12:57:50 +1000 |
commit | 5a26a11f0da1941b38ca34c3ba2a4e1265392049 (patch) | |
tree | 8c4f2baf477aebf6ebc68fea362c6943795ac9e3 /src | |
parent | fca6813c068a38cd3c6ea7bb9d3525a827ff0c54 (diff) | |
download | mongo-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.c | 5 |
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); } |