summaryrefslogtreecommitdiff
path: root/src/third_party/wiredtiger/src/lsm/lsm_tree.c
diff options
context:
space:
mode:
authorLuke Chen <luke.chen@mongodb.com>2018-01-05 22:07:41 +1100
committerLuke Chen <luke.chen@mongodb.com>2018-01-05 22:07:41 +1100
commitbd9ed5bbe07754221ad014dceefc0ebdb0ecab32 (patch)
tree622a3cc94249954a7bf0757231c40792c9ef5378 /src/third_party/wiredtiger/src/lsm/lsm_tree.c
parent2158ea8d6c84c9a68b50f76c9dd23b8a193b65f8 (diff)
downloadmongo-bd9ed5bbe07754221ad014dceefc0ebdb0ecab32.tar.gz
Import wiredtiger: 9e5044823185feffa71e56a6593cfb92e0741a41 from branch mongodb-3.8
ref: 1a29eac4dc..9e50448231 for: 3.7.1 WT-2705 High throughput cache bound many threaded workloads can experience long latencies WT-3725 Add statistics to locks around timestamp structures WT-3750 Fast-path fs_directory_list of a single file. WT-3768 Lookaside optimization: birthmarks WT-3769 Fix a bug in reverse cursor walks with particular delete patterns and prefix compression enabled WT-3779 Add support for string formats with WT_CURSOR::modify WT-3800 test_wt2834_join_bloom_fix hang WT-3806 Make sure rdtsc values move forward in time WT-3807 clang static analysis updates WT-3810 wt_rdtsc calibration needs to be longer and verify validity WT-3812 debugging page output should handle complex key/value items. WT-3816 Enable prefix compression on the lookaside table WT-3819 clang static analysis improvements WT-3820 Add a WT_SESSION.breakpoint method for Python debugging. WT-3822 Update WiredTiger copyrights to 2018 WT-3824 tsc_nsec_ratio can compute to zero and cause divide by zero bug
Diffstat (limited to 'src/third_party/wiredtiger/src/lsm/lsm_tree.c')
-rw-r--r--src/third_party/wiredtiger/src/lsm/lsm_tree.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/src/third_party/wiredtiger/src/lsm/lsm_tree.c b/src/third_party/wiredtiger/src/lsm/lsm_tree.c
index cef5e51e214..1b92028072d 100644
--- a/src/third_party/wiredtiger/src/lsm/lsm_tree.c
+++ b/src/third_party/wiredtiger/src/lsm/lsm_tree.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 2014-2017 MongoDB, Inc.
+ * Copyright (c) 2014-2018 MongoDB, Inc.
* Copyright (c) 2008-2014 WiredTiger, Inc.
* All rights reserved.
*
@@ -912,6 +912,7 @@ __wt_lsm_tree_drop(
bool locked;
locked = false;
+ WT_NOT_READ(locked);
/* Get the LSM tree. */
WT_RET(__wt_lsm_tree_get(session, name, true, &lsm_tree));
@@ -971,6 +972,7 @@ __wt_lsm_tree_rename(WT_SESSION_IMPL *session,
old = NULL;
locked = false;
+ WT_NOT_READ(locked);
/* Get the LSM tree. */
WT_RET(__wt_lsm_tree_get(session, olduri, true, &lsm_tree));
@@ -1039,8 +1041,10 @@ __wt_lsm_tree_truncate(
bool locked;
WT_UNUSED(cfg);
+
chunk = NULL;
locked = false;
+ WT_NOT_READ(locked);
/* Get the LSM tree. */
WT_RET(__wt_lsm_tree_get(session, name, true, &lsm_tree));
@@ -1378,9 +1382,10 @@ __wt_lsm_tree_worker(WT_SESSION_IMPL *session,
u_int i;
bool exclusive, locked, need_release;
- locked = false;
- need_release = false;
+ locked = need_release = false;
+ WT_NOT_READ(locked);
exclusive = FLD_ISSET(open_flags, WT_DHANDLE_EXCLUSIVE);
+
WT_RET(__wt_lsm_tree_get(session, uri, exclusive, &lsm_tree));
need_release = true;
@@ -1419,20 +1424,18 @@ __wt_lsm_tree_worker(WT_SESSION_IMPL *session,
*/
if (FLD_ISSET(open_flags, WT_BTREE_ALTER)) {
WT_ERR(__wt_lsm_meta_write(session, lsm_tree, cfg[0]));
- /*
- * We're about to discard the tree so we do not need to
- * release it later.
- */
- need_release = false;
+
+ locked = false;
if (exclusive)
__wt_lsm_tree_writeunlock(session, lsm_tree);
else
__wt_lsm_tree_readunlock(session, lsm_tree);
- locked = false;
+
/*
* We rewrote the meta-data. Discard the tree and the next
* access will reopen it.
*/
+ need_release = false;
WT_WITH_HANDLE_LIST_WRITE_LOCK(session,
ret = __lsm_tree_discard(session, lsm_tree, false));
WT_ERR(ret);