summaryrefslogtreecommitdiff
path: root/src/txn/txn_ckpt.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/txn/txn_ckpt.c')
-rw-r--r--src/txn/txn_ckpt.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/txn/txn_ckpt.c b/src/txn/txn_ckpt.c
index bc1537ca878..4112d5f31c7 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) ?