diff options
-rw-r--r-- | src/include/lsm.h | 2 | ||||
-rw-r--r-- | src/lsm/lsm_cursor.c | 2 | ||||
-rw-r--r-- | src/lsm/lsm_tree.c | 14 | ||||
-rw-r--r-- | test/suite/test_lsm03.py | 4 |
4 files changed, 11 insertions, 11 deletions
diff --git a/src/include/lsm.h b/src/include/lsm.h index 7251b43d2bd..eacb4d52d3e 100644 --- a/src/include/lsm.h +++ b/src/include/lsm.h @@ -179,7 +179,7 @@ struct __wt_lsm_tree { int collator_owned; uint32_t refcnt; /* Number of users of the tree */ - WT_SESSION_IMPL *exclusive; /* Tree is locked exclusively */ + WT_SESSION_IMPL *excl_session; /* Session has exclusive lock */ #define LSM_TREE_MAX_QUEUE 100 uint32_t queue_ref; diff --git a/src/lsm/lsm_cursor.c b/src/lsm/lsm_cursor.c index 0197b6481f4..e023b2b407e 100644 --- a/src/lsm/lsm_cursor.c +++ b/src/lsm/lsm_cursor.c @@ -1556,7 +1556,7 @@ __wt_clsm_open(WT_SESSION_IMPL *session, WT_ERR(ret); /* Make sure we have exclusive access if and only if we want it */ - WT_ASSERT(session, !bulk || lsm_tree->exclusive); + WT_ASSERT(session, !bulk || lsm_tree->excl_session != NULL); WT_ERR(__wt_calloc_one(session, &clsm)); diff --git a/src/lsm/lsm_tree.c b/src/lsm/lsm_tree.c index 48648b99d2f..f5c51a3fbda 100644 --- a/src/lsm/lsm_tree.c +++ b/src/lsm/lsm_tree.c @@ -369,7 +369,7 @@ __lsm_tree_find(WT_SESSION_IMPL *session, * exclusive flag. */ if (!__wt_atomic_cas_ptr( - &lsm_tree->exclusive, NULL, session)) + &lsm_tree->excl_session, NULL, session)) return (EBUSY); /* @@ -381,7 +381,7 @@ __lsm_tree_find(WT_SESSION_IMPL *session, !__wt_atomic_cas32( &lsm_tree->refcnt, 0, 1)) { F_SET(lsm_tree, WT_LSM_TREE_ACTIVE); - lsm_tree->exclusive = NULL; + lsm_tree->excl_session = NULL; return (EBUSY); } } else { @@ -391,7 +391,7 @@ __lsm_tree_find(WT_SESSION_IMPL *session, * We got a reference, check if an exclusive * lock beat us to it. */ - if (lsm_tree->exclusive != NULL) { + if (lsm_tree->excl_session != NULL) { WT_ASSERT(session, lsm_tree->refcnt > 0); (void)__wt_atomic_sub32( @@ -487,7 +487,7 @@ __lsm_tree_open(WT_SESSION_IMPL *session, * with getting handles exclusive. */ lsm_tree->refcnt = 1; - lsm_tree->exclusive = exclusive ? session : NULL; + lsm_tree->excl_session = exclusive ? session : NULL; lsm_tree->queue_ref = 0; /* Set a flush timestamp as a baseline. */ @@ -522,7 +522,7 @@ __wt_lsm_tree_get(WT_SESSION_IMPL *session, ret = __lsm_tree_open(session, uri, exclusive, treep); WT_ASSERT(session, ret != 0 || - (exclusive ? session : NULL) == (*treep)->exclusive); + (*treep)->excl_session == (exclusive ? session : NULL)); return (ret); } @@ -534,10 +534,10 @@ void __wt_lsm_tree_release(WT_SESSION_IMPL *session, WT_LSM_TREE *lsm_tree) { WT_ASSERT(session, lsm_tree->refcnt > 0); - if (lsm_tree->exclusive == session) { + if (lsm_tree->excl_session == session) { /* We cleared the active flag when getting exclusive access. */ F_SET(lsm_tree, WT_LSM_TREE_ACTIVE); - lsm_tree->exclusive = NULL; + lsm_tree->excl_session = NULL; } (void)__wt_atomic_sub32(&lsm_tree->refcnt, 1); } diff --git a/test/suite/test_lsm03.py b/test/suite/test_lsm03.py index 37d1f761744..448d864c646 100644 --- a/test/suite/test_lsm03.py +++ b/test/suite/test_lsm03.py @@ -33,14 +33,14 @@ from helper import simple_populate # Check to make sure that LSM schema operations don't get EBUSY when # there are no user operations active. class test_lsm03(wttest.WiredTigerTestCase): - name = 'test_rebalance' + name = 'test_lsm03' # Use small pages so we generate some internal layout # Setup LSM so multiple chunks are present config = 'key_format=S,allocation_size=512,internal_page_max=512' + \ ',leaf_page_max=1k,lsm=(chunk_size=512k,merge_min=10)' - # Populate an object, then rebalance it. + # Populate an object then drop it. def test_lsm_drop_active(self): uri = 'lsm:' + self.name simple_populate(self, uri, self.config, 10000) |