summaryrefslogtreecommitdiff
path: root/src/third_party/wiredtiger/src/support/hazard.c
diff options
context:
space:
mode:
authorRamon Fernandez <ramon@mongodb.com>2016-09-26 08:10:04 -0400
committerRamon Fernandez <ramon@mongodb.com>2016-09-26 08:10:04 -0400
commit79d9b3ab5ce20f51c272b4411202710a082d0317 (patch)
tree02896bc295ffcd4a0201bda0663160bc22de2c2a /src/third_party/wiredtiger/src/support/hazard.c
parent7026ff8dbc62b9649e8be1793d3273d9cc162174 (diff)
downloadmongo-r3.2.10.tar.gz
Import wiredtiger: 9cf2f89d6d95e1de797f05ab1fef28695f8bae7b from branch mongodb-3.2r3.2.10-rc2r3.2.10
ref: bb18c43915..9cf2f89d6d for: 3.2.10 WT-2864 Reconfiguring the checkpoint server can lead to hangs WT-2874 Change test_compact01 to avoid eviction WT-2918 The dist scripts create C files s_whitespace complains about WT-2919 Don't mask error returns from style checking scripts WT-2921 Reduce the WT_SESSION hazard_size when possible WT-2923 heap-use-after-free on address in compaction WT-2924 Ensure we are doing eviction when threads are waiting for it WT-2925 WT_THREAD_PANIC_FAIL is a WT_THREAD structure flag WT-2926 WT_CONNECTION.reconfigure can attempt unlock of not-locked lock WT-2928 Eviction failing to switch queues can lead to starvation
Diffstat (limited to 'src/third_party/wiredtiger/src/support/hazard.c')
-rw-r--r--src/third_party/wiredtiger/src/support/hazard.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/third_party/wiredtiger/src/support/hazard.c b/src/third_party/wiredtiger/src/support/hazard.c
index 8ac8f5f9f6d..46b63ac6129 100644
--- a/src/third_party/wiredtiger/src/support/hazard.c
+++ b/src/third_party/wiredtiger/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);
}