summaryrefslogtreecommitdiff
path: root/src/lsm
diff options
context:
space:
mode:
authorMichael Cahill <michael.cahill@wiredtiger.com>2012-10-18 19:16:18 +1100
committerMichael Cahill <michael.cahill@wiredtiger.com>2012-10-18 19:16:18 +1100
commit6eec6ac839f9d91b08d40a7dfd6e29e74bc84922 (patch)
treeb0baefbbc46f72e220cd123b63dd3584b1bc05fe /src/lsm
parente6d7d24646270a64c42479e31da5d6da27ed691e (diff)
downloadmongo-6eec6ac839f9d91b08d40a7dfd6e29e74bc84922.tar.gz
Change direct calls to __wt_curfile_open to generic __wt_open_cursor.
Diffstat (limited to 'src/lsm')
-rw-r--r--src/lsm/lsm_cursor.c4
-rw-r--r--src/lsm/lsm_merge.c12
-rw-r--r--src/lsm/lsm_worker.c6
3 files changed, 9 insertions, 13 deletions
diff --git a/src/lsm/lsm_cursor.c b/src/lsm/lsm_cursor.c
index 5b07a29ccd9..62914a55166 100644
--- a/src/lsm/lsm_cursor.c
+++ b/src/lsm/lsm_cursor.c
@@ -155,7 +155,7 @@ __clsm_open_cursors(WT_CURSOR_LSM *clsm, int start_chunk)
* Once all cursors switch, the in-memory tree can be evicted.
*/
chunk = lsm_tree->chunk[i + start_chunk];
- ret = __wt_curfile_open(session,
+ ret = __wt_open_cursor(session,
chunk->uri, &clsm->iface,
!F_ISSET(chunk, WT_LSM_CHUNK_ONDISK) ? NULL :
(F_ISSET(clsm, WT_CLSM_MERGE) ? merge_cfg : ckpt_cfg), cp);
@@ -166,7 +166,7 @@ __clsm_open_cursors(WT_CURSOR_LSM *clsm, int start_chunk)
* chunk instead.
*/
if (ret == WT_NOTFOUND && F_ISSET(chunk, WT_LSM_CHUNK_ONDISK))
- ret = __wt_curfile_open(session,
+ ret = __wt_open_cursor(session,
chunk->uri, &clsm->iface, NULL, cp);
WT_ERR(ret);
diff --git a/src/lsm/lsm_merge.c b/src/lsm/lsm_merge.c
index 44957c6b34f..f19afbe1a13 100644
--- a/src/lsm/lsm_merge.c
+++ b/src/lsm/lsm_merge.c
@@ -69,7 +69,8 @@ __wt_lsm_merge(WT_SESSION_IMPL *session, WT_LSM_TREE *lsm_tree, int stalls)
WT_DECL_RET;
WT_ITEM key, value;
WT_LSM_CHUNK *chunk;
- WT_SESSION *wt_session;
+ const char *cur_cfg[] =
+ API_CONF_DEFAULTS(session, open_cursor, "bulk,raw");
uint32_t generation;
uint64_t insert_count, record_count;
int create_bloom, dest_id, end_chunk, i;
@@ -179,9 +180,7 @@ __wt_lsm_merge(WT_SESSION_IMPL *session, WT_LSM_TREE *lsm_tree, int stalls)
* then restrict the cursor to a specific number of chunks;
* then set MERGE so the cursor doesn't track updates to the tree.
*/
- wt_session = &session->iface;
- WT_ERR(wt_session->open_cursor(
- wt_session, lsm_tree->name, NULL, NULL, &src));
+ WT_ERR(__wt_open_cursor(session, lsm_tree->name, NULL, NULL, &src));
F_SET(src, WT_CURSTD_RAW);
WT_ERR(__wt_clsm_init_merge(src, start_chunk, nchunks));
@@ -193,8 +192,7 @@ __wt_lsm_merge(WT_SESSION_IMPL *session, WT_LSM_TREE *lsm_tree, int stalls)
NULL, record_count, lsm_tree->bloom_bit_count,
lsm_tree->bloom_hash_count, &bloom));
- WT_ERR(wt_session->open_cursor(
- wt_session, chunk->uri, NULL, "raw,bulk", &dest));
+ WT_ERR(__wt_open_cursor(session, chunk->uri, NULL, cur_cfg, &dest));
for (insert_count = 0; (ret = src->next(src)) == 0; insert_count++) {
if (insert_count % 1000 &&
@@ -253,7 +251,7 @@ err: if (src != NULL)
* harmless to leave the file - it does not interfere
* with later re-use.
WT_WITH_SCHEMA_LOCK(session,
- (void)wt_session->drop(wt_session, chunk->uri, NULL));
+ (void)__wt_schema_drop(session, chunk->uri, NULL));
*/
__wt_free(session, chunk->bloom_uri);
__wt_free(session, chunk->uri);
diff --git a/src/lsm/lsm_worker.c b/src/lsm/lsm_worker.c
index 3e9951dbafb..e19e014c96e 100644
--- a/src/lsm/lsm_worker.c
+++ b/src/lsm/lsm_worker.c
@@ -174,7 +174,7 @@ __lsm_bloom_create(WT_SESSION_IMPL *session,
WT_CURSOR *src;
WT_DECL_RET;
WT_ITEM key;
- WT_SESSION *wt_session;
+ const char *cur_cfg[] = API_CONF_DEFAULTS(session, open_cursor, "raw");
uint64_t insert_count;
if (!FLD_ISSET(lsm_tree->bloom, WT_LSM_BLOOM_NEWEST) ||
@@ -183,14 +183,12 @@ __lsm_bloom_create(WT_SESSION_IMPL *session,
WT_ASSERT(session, chunk->bloom_uri != NULL);
- wt_session = &session->iface;
bloom = NULL;
WT_ERR(__wt_bloom_create(session, chunk->bloom_uri, NULL, chunk->count,
lsm_tree->bloom_bit_count, lsm_tree->bloom_hash_count, &bloom));
- WT_ERR(wt_session->open_cursor(
- wt_session, chunk->uri, NULL, "raw", &src));
+ WT_ERR(__wt_open_cursor(session, chunk->uri, NULL, cur_cfg, &src));
for (insert_count = 0; (ret = src->next(src)) == 0; insert_count++) {
WT_ERR(src->get_key(src, &key));