summaryrefslogtreecommitdiff
path: root/src/third_party/wiredtiger/src/reconcile/rec_write.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/third_party/wiredtiger/src/reconcile/rec_write.c')
-rw-r--r--src/third_party/wiredtiger/src/reconcile/rec_write.c50
1 files changed, 27 insertions, 23 deletions
diff --git a/src/third_party/wiredtiger/src/reconcile/rec_write.c b/src/third_party/wiredtiger/src/reconcile/rec_write.c
index d2242a9b2a0..929728740dc 100644
--- a/src/third_party/wiredtiger/src/reconcile/rec_write.c
+++ b/src/third_party/wiredtiger/src/reconcile/rec_write.c
@@ -48,7 +48,8 @@ __wt_reconcile(WT_SESSION_IMPL *session, WT_REF *ref, WT_SALVAGE_COOKIE *salvage
* doesn't apply to checkpoints: there are (rare) cases where we write data at read-uncommitted
* isolation.
*/
- WT_ASSERT(session, !LF_ISSET(WT_REC_EVICT) || LF_ISSET(WT_REC_VISIBLE_ALL) ||
+ WT_ASSERT(session,
+ !LF_ISSET(WT_REC_EVICT) || LF_ISSET(WT_REC_VISIBLE_ALL) ||
F_ISSET(session->txn, WT_TXN_HAS_SNAPSHOT));
/* It's an error to be called with a clean page. */
@@ -318,7 +319,8 @@ __rec_write_page_status(WT_SESSION_IMPL *session, WT_RECONCILE *r)
* eviction case. Otherwise, we must be reconciling a fixed length column store page (which
* does not allow history store content).
*/
- WT_ASSERT(session, !F_ISSET(r, WT_REC_EVICT) ||
+ WT_ASSERT(session,
+ !F_ISSET(r, WT_REC_EVICT) ||
(F_ISSET(r, WT_REC_HS | WT_REC_IN_MEMORY) || page->type == WT_PAGE_COL_FIX));
} else {
/*
@@ -1848,7 +1850,8 @@ copy_image:
* The I/O routines verify all disk images we write, but there are paths in reconciliation that
* don't do I/O. Verify those images, too.
*/
- WT_ASSERT(session, verify_image == false ||
+ WT_ASSERT(session,
+ verify_image == false ||
__wt_verify_dsk_image(
session, "[reconcile-image]", chunk->image.data, 0, &multi->addr, true) == 0);
#endif
@@ -2027,7 +2030,7 @@ __rec_split_dump_keys(WT_SESSION_IMPL *session, WT_RECONCILE *r)
for (multi = r->multi, i = 0; i < r->multi_next; ++multi, ++i)
__wt_verbose(session, WT_VERB_SPLIT, "starting key %s",
__wt_buf_set_printable(
- session, WT_IKEY_DATA(multi->key.ikey), multi->key.ikey->size, tkey));
+ session, WT_IKEY_DATA(multi->key.ikey), multi->key.ikey->size, tkey));
__wt_scr_free(session, &tkey);
} else
for (multi = r->multi, i = 0; i < r->multi_next; ++multi, ++i)
@@ -2148,20 +2151,21 @@ __rec_write_wrapup(WT_SESSION_IMPL *session, WT_RECONCILE *r, WT_PAGE *page)
mod->rec_result = WT_PM_REC_EMPTY;
break;
case 1: /* 1-for-1 page swap */
- /*
- * Because WiredTiger's pages grow without splitting, we're replacing a single page with
- * another single page most of the time.
- *
- * If in-memory, or saving/restoring changes for this page and there's only one block,
- * there's nothing to write. Set up a single block as if to split, then use that disk
- * image to rewrite the page in memory. This is separate from simple replacements where
- * eviction has decided to retain the page in memory because the latter can't handle
- * update lists and splits can.
- */
+ /*
+ * Because WiredTiger's pages grow without splitting, we're replacing a single page with
+ * another single page most of the time.
+ *
+ * If in-memory, or saving/restoring changes for this page and there's only one block,
+ * there's nothing to write. Set up a single block as if to split, then use that disk image
+ * to rewrite the page in memory. This is separate from simple replacements where eviction
+ * has decided to retain the page in memory because the latter can't handle update lists and
+ * splits can.
+ */
if (F_ISSET(r, WT_REC_IN_MEMORY) || r->multi->supd_restore) {
- WT_ASSERT(session, F_ISSET(r, WT_REC_IN_MEMORY) ||
+ WT_ASSERT(session,
+ F_ISSET(r, WT_REC_IN_MEMORY) ||
(F_ISSET(r, WT_REC_EVICT) && (r->leave_dirty || page->type == WT_PAGE_COL_FIX) &&
- r->multi->supd_entries != 0));
+ r->multi->supd_entries != 0));
goto split;
}
@@ -2192,10 +2196,10 @@ __rec_write_wrapup(WT_SESSION_IMPL *session, WT_RECONCILE *r, WT_PAGE *page)
if (WT_VERBOSE_ISSET(session, WT_VERB_SPLIT))
WT_RET(__rec_split_dump_keys(session, r));
- /*
- * The reuse flag was set in some cases, but we have to clear it, otherwise on subsequent
- * reconciliation we would fail to remove blocks that are being discarded.
- */
+ /*
+ * The reuse flag was set in some cases, but we have to clear it, otherwise on subsequent
+ * reconciliation we would fail to remove blocks that are being discarded.
+ */
split:
for (multi = r->multi, i = 0; i < r->multi_next; ++multi, ++i)
multi->addr.reuse = 0;
@@ -2263,7 +2267,7 @@ __rec_hs_wrapup(WT_SESSION_IMPL *session, WT_RECONCILE *r)
{
WT_DECL_RET;
WT_MULTI *multi;
- uint32_t i, session_flags;
+ uint32_t i;
/* Check if there's work to do. */
for (multi = r->multi, i = 0; i < r->multi_next; ++multi, ++i)
@@ -2272,7 +2276,7 @@ __rec_hs_wrapup(WT_SESSION_IMPL *session, WT_RECONCILE *r)
if (i == r->multi_next)
return (0);
- WT_RET(__wt_hs_cursor_open(session, &session_flags));
+ WT_RET(__wt_hs_cursor_open(session));
for (multi = r->multi, i = 0; i < r->multi_next; ++multi, ++i)
if (multi->supd != NULL) {
@@ -2285,7 +2289,7 @@ __rec_hs_wrapup(WT_SESSION_IMPL *session, WT_RECONCILE *r)
}
err:
- WT_TRET(__wt_hs_cursor_close(session, session_flags));
+ WT_TRET(__wt_hs_cursor_close(session));
return (ret);
}