diff options
Diffstat (limited to 'src/third_party/wiredtiger/src/reconcile/rec_track.c')
-rw-r--r-- | src/third_party/wiredtiger/src/reconcile/rec_track.c | 41 |
1 files changed, 21 insertions, 20 deletions
diff --git a/src/third_party/wiredtiger/src/reconcile/rec_track.c b/src/third_party/wiredtiger/src/reconcile/rec_track.c index c5c72391248..2533ad9e201 100644 --- a/src/third_party/wiredtiger/src/reconcile/rec_track.c +++ b/src/third_party/wiredtiger/src/reconcile/rec_track.c @@ -335,12 +335,12 @@ __ovfl_reuse_wrapup(WT_SESSION_IMPL *session, WT_PAGE *page) * fixing up skiplist links. */ for (i = WT_SKIP_MAXDEPTH - 1; i > 0; --i) - for (e = &head[i]; *e != NULL;) { - if (F_ISSET(*e, WT_OVFL_REUSE_INUSE)) { - e = &(*e)->next[i]; + for (e = &head[i]; (reuse = *e) != NULL;) { + if (F_ISSET(reuse, WT_OVFL_REUSE_INUSE)) { + e = &reuse->next[i]; continue; } - *e = (*e)->next[i]; + *e = reuse->next[i]; } /* @@ -359,19 +359,20 @@ __ovfl_reuse_wrapup(WT_SESSION_IMPL *session, WT_PAGE *page) if (F_ISSET(reuse, WT_OVFL_REUSE_INUSE)) { F_CLR(reuse, WT_OVFL_REUSE_INUSE | WT_OVFL_REUSE_JUST_ADDED); - e = &(*e)->next[0]; + e = &reuse->next[0]; continue; } - *e = (*e)->next[0]; + *e = reuse->next[0]; WT_ASSERT(session, !F_ISSET(reuse, WT_OVFL_REUSE_JUST_ADDED)); - decr += WT_OVFL_SIZE(reuse, WT_OVFL_REUSE); if (WT_VERBOSE_ISSET(session, WT_VERB_OVERFLOW)) WT_RET( __ovfl_reuse_verbose(session, page, reuse, "free")); + WT_RET(bm->free( bm, session, WT_OVFL_REUSE_ADDR(reuse), reuse->addr_size)); + decr += WT_OVFL_SIZE(reuse, WT_OVFL_REUSE); __wt_free(session, reuse); } @@ -404,12 +405,12 @@ __ovfl_reuse_wrapup_err(WT_SESSION_IMPL *session, WT_PAGE *page) * fixing up skiplist links. */ for (i = WT_SKIP_MAXDEPTH - 1; i > 0; --i) - for (e = &head[i]; *e != NULL;) { - if (!F_ISSET(*e, WT_OVFL_REUSE_JUST_ADDED)) { - e = &(*e)->next[i]; + for (e = &head[i]; (reuse = *e) != NULL;) { + if (!F_ISSET(reuse, WT_OVFL_REUSE_JUST_ADDED)) { + e = &reuse->next[i]; continue; } - *e = (*e)->next[i]; + *e = reuse->next[i]; } /* @@ -420,17 +421,17 @@ __ovfl_reuse_wrapup_err(WT_SESSION_IMPL *session, WT_PAGE *page) for (e = &head[0]; (reuse = *e) != NULL;) { if (!F_ISSET(reuse, WT_OVFL_REUSE_JUST_ADDED)) { F_CLR(reuse, WT_OVFL_REUSE_INUSE); - e = &(*e)->next[0]; + e = &reuse->next[0]; continue; } - *e = (*e)->next[0]; + *e = reuse->next[0]; if (WT_VERBOSE_ISSET(session, WT_VERB_OVERFLOW)) WT_RET( __ovfl_reuse_verbose(session, page, reuse, "free")); + WT_TRET(bm->free( bm, session, WT_OVFL_REUSE_ADDR(reuse), reuse->addr_size)); - decr += WT_OVFL_SIZE(reuse, WT_OVFL_REUSE); __wt_free(session, reuse); } @@ -722,26 +723,26 @@ __ovfl_txnc_wrapup(WT_SESSION_IMPL *session, WT_PAGE *page) for (i = WT_SKIP_MAXDEPTH - 1; i > 0; --i) for (e = &head[i]; (txnc = *e) != NULL;) { if (TXNID_LE(oldest_txn, txnc->current)) { - e = &(*e)->next[i]; + e = &txnc->next[i]; continue; } - *e = (*e)->next[i]; + *e = txnc->next[i]; } /* Second, discard any no longer needed transaction-cache records. */ decr = 0; for (e = &head[0]; (txnc = *e) != NULL;) { if (TXNID_LE(oldest_txn, txnc->current)) { - e = &(*e)->next[0]; + e = &txnc->next[0]; continue; } - *e = (*e)->next[0]; - - decr += WT_OVFL_SIZE(txnc, WT_OVFL_TXNC); + *e = txnc->next[0]; if (WT_VERBOSE_ISSET(session, WT_VERB_OVERFLOW)) WT_RET( __ovfl_txnc_verbose(session, page, txnc, "free")); + + decr += WT_OVFL_SIZE(txnc, WT_OVFL_TXNC); __wt_free(session, txnc); } |