summaryrefslogtreecommitdiff
path: root/src/txn
diff options
context:
space:
mode:
authorKeith Bostic <keith@wiredtiger.com>2016-01-01 16:14:23 -0500
committerKeith Bostic <keith@wiredtiger.com>2016-01-01 16:14:23 -0500
commitda9b67d933e5ad13829ba21d3eada5a7188cb7c7 (patch)
treee8a5657b24ec2f5954b7a937ec30b09e9590570f /src/txn
parent67f76e0a711fedc290cb7f5d4319a5fb1a87e831 (diff)
parentf1a56169ba8d6bcaefac26d05aa08d7b170e8b89 (diff)
downloadmongo-da9b67d933e5ad13829ba21d3eada5a7188cb7c7.tar.gz
Merge branch 'develop' into wt-2287-rebalance
Diffstat (limited to 'src/txn')
-rw-r--r--src/txn/txn_ckpt.c17
-rw-r--r--src/txn/txn_recover.c2
2 files changed, 10 insertions, 9 deletions
diff --git a/src/txn/txn_ckpt.c b/src/txn/txn_ckpt.c
index fd1cea5564d..8256db3a2f8 100644
--- a/src/txn/txn_ckpt.c
+++ b/src/txn/txn_ckpt.c
@@ -56,7 +56,7 @@ __checkpoint_name_check(WT_SESSION_IMPL *session, const char *uri)
* confirm the metadata file contains no non-file objects.
*/
if (uri == NULL) {
- WT_ERR(__wt_metadata_cursor(session, NULL, &cursor));
+ WT_RET(__wt_metadata_cursor(session, &cursor));
while ((ret = cursor->next(cursor)) == 0) {
WT_ERR(cursor->get_key(cursor, &uri));
if (!WT_PREFIX_MATCH(uri, "colgroup:") &&
@@ -79,8 +79,7 @@ __checkpoint_name_check(WT_SESSION_IMPL *session, const char *uri)
WT_ERR_MSG(session, EINVAL,
"%s object does not support named checkpoints", fail);
-err: if (cursor != NULL)
- WT_TRET(cursor->close(cursor));
+err: WT_TRET(__wt_metadata_cursor_release(session, &cursor));
return (ret);
}
@@ -371,7 +370,7 @@ __txn_checkpoint(WT_SESSION_IMPL *session, const char *cfg[])
full = idle = logging = tracking = false;
/* Ensure the metadata table is open before taking any locks. */
- WT_RET(__wt_metadata_open(session));
+ WT_RET(__wt_metadata_cursor(session, NULL));
/*
* Do a pass over the configuration arguments and figure out what kind
@@ -551,14 +550,16 @@ __txn_checkpoint(WT_SESSION_IMPL *session, const char *cfg[])
saved_meta_next = session->meta_track_next;
session->meta_track_next = NULL;
WT_WITH_DHANDLE(session,
- session->meta_dhandle, ret = __wt_checkpoint(session, cfg));
+ WT_SESSION_META_DHANDLE(session),
+ ret = __wt_checkpoint(session, cfg));
session->meta_track_next = saved_meta_next;
WT_ERR(ret);
WT_ERR(__checkpoint_verbose_track(session,
"metadata sync completed", &verb_timer));
} else
- WT_WITH_DHANDLE(session, session->meta_dhandle,
+ WT_WITH_DHANDLE(session,
+ WT_SESSION_META_DHANDLE(session),
ret = __wt_txn_checkpoint_log(
session, false, WT_TXN_LOG_CKPT_SYNC, NULL));
@@ -601,8 +602,8 @@ err: /*
*/
if (full && logging) {
if (ret == 0 &&
- F_ISSET((WT_BTREE *)session->meta_dhandle->handle,
- WT_BTREE_SKIP_CKPT))
+ F_ISSET(((WT_CURSOR_BTREE *)
+ session->meta_cursor)->btree, WT_BTREE_SKIP_CKPT))
idle = true;
WT_TRET(__wt_txn_checkpoint_log(session, full,
(ret == 0 && !idle) ?
diff --git a/src/txn/txn_recover.c b/src/txn/txn_recover.c
index d0b3b909f09..e3d3781026c 100644
--- a/src/txn/txn_recover.c
+++ b/src/txn/txn_recover.c
@@ -427,7 +427,7 @@ __wt_txn_recover(WT_SESSION_IMPL *session)
WT_ERR(__wt_metadata_search(session, WT_METAFILE_URI, &config));
WT_ERR(__recovery_setup_file(&r, WT_METAFILE_URI, config));
- WT_ERR(__wt_metadata_cursor(session, NULL, &metac));
+ WT_ERR(__wt_metadata_cursor_open(session, NULL, &metac));
metafile = &r.files[WT_METAFILE_ID];
metafile->c = metac;