mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-04 19:34:13 +08:00
mdbx: minor unify gc-update debug logging (cosmetics).
This commit is contained in:
parent
3c82ced097
commit
c3c088b8c3
23
src/core.c
23
src/core.c
@ -8810,7 +8810,7 @@ retry_noaccount:
|
|||||||
goto bailout;
|
goto bailout;
|
||||||
mdbx_tassert(txn,
|
mdbx_tassert(txn,
|
||||||
cleaned_gc_id < env->me_lck->mti_oldest_reader.weak);
|
cleaned_gc_id < env->me_lck->mti_oldest_reader.weak);
|
||||||
mdbx_trace("%s.cleanup-reclaimed-id [%u]%" PRIaTXN, dbg_prefix_mode,
|
mdbx_trace("%s: cleanup-reclaimed-id [%u]%" PRIaTXN, dbg_prefix_mode,
|
||||||
cleaned_gc_slot, cleaned_gc_id);
|
cleaned_gc_slot, cleaned_gc_id);
|
||||||
mdbx_tassert(txn, *txn->tw.cursors == &couple.outer);
|
mdbx_tassert(txn, *txn->tw.cursors == &couple.outer);
|
||||||
rc = mdbx_cursor_del(&couple.outer, 0);
|
rc = mdbx_cursor_del(&couple.outer, 0);
|
||||||
@ -8852,7 +8852,7 @@ retry_noaccount:
|
|||||||
}
|
}
|
||||||
mdbx_tassert(txn, cleaned_gc_id <= txn->tw.last_reclaimed);
|
mdbx_tassert(txn, cleaned_gc_id <= txn->tw.last_reclaimed);
|
||||||
mdbx_tassert(txn, cleaned_gc_id < env->me_lck->mti_oldest_reader.weak);
|
mdbx_tassert(txn, cleaned_gc_id < env->me_lck->mti_oldest_reader.weak);
|
||||||
mdbx_trace("%s.cleanup-reclaimed-id %" PRIaTXN, dbg_prefix_mode,
|
mdbx_trace("%s: cleanup-reclaimed-id %" PRIaTXN, dbg_prefix_mode,
|
||||||
cleaned_gc_id);
|
cleaned_gc_id);
|
||||||
mdbx_tassert(txn, *txn->tw.cursors == &couple.outer);
|
mdbx_tassert(txn, *txn->tw.cursors == &couple.outer);
|
||||||
rc = mdbx_cursor_del(&couple.outer, 0);
|
rc = mdbx_cursor_del(&couple.outer, 0);
|
||||||
@ -8984,7 +8984,7 @@ retry_noaccount:
|
|||||||
mdbx_assert(env, data.iov_len == MDBX_PNL_SIZEOF(txn->tw.retired_pages));
|
mdbx_assert(env, data.iov_len == MDBX_PNL_SIZEOF(txn->tw.retired_pages));
|
||||||
memcpy(data.iov_base, txn->tw.retired_pages, data.iov_len);
|
memcpy(data.iov_base, txn->tw.retired_pages, data.iov_len);
|
||||||
|
|
||||||
mdbx_trace("%s.put-retired #%u @ %" PRIaTXN, dbg_prefix_mode,
|
mdbx_trace("%s: put-retired #%u @ %" PRIaTXN, dbg_prefix_mode,
|
||||||
retired_stored, txn->mt_txnid);
|
retired_stored, txn->mt_txnid);
|
||||||
|
|
||||||
if (mdbx_log_enabled(MDBX_LOG_EXTRA)) {
|
if (mdbx_log_enabled(MDBX_LOG_EXTRA)) {
|
||||||
@ -8997,10 +8997,11 @@ retry_noaccount:
|
|||||||
mdbx_debug_extra_print("%s\n", ".");
|
mdbx_debug_extra_print("%s\n", ".");
|
||||||
}
|
}
|
||||||
if (unlikely(amount != MDBX_PNL_SIZE(txn->tw.reclaimed_pglist))) {
|
if (unlikely(amount != MDBX_PNL_SIZE(txn->tw.reclaimed_pglist))) {
|
||||||
mdbx_trace("%s.reclaimed-list changed %u -> %u, retry", dbg_prefix_mode,
|
mdbx_trace("%s: reclaimed-list changed %u -> %u, retry",
|
||||||
amount, (unsigned)MDBX_PNL_SIZE(txn->tw.reclaimed_pglist));
|
dbg_prefix_mode, amount,
|
||||||
goto retry_noaccount /* rare case, but avoids GC fragmentation and one
|
(unsigned)MDBX_PNL_SIZE(txn->tw.reclaimed_pglist));
|
||||||
cycle. */
|
goto retry_noaccount /* rare case, but avoids GC fragmentation
|
||||||
|
and one cycle. */
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
@ -9281,7 +9282,7 @@ retry_noaccount:
|
|||||||
key.iov_len = sizeof(reservation_gc_id);
|
key.iov_len = sizeof(reservation_gc_id);
|
||||||
key.iov_base = &reservation_gc_id;
|
key.iov_base = &reservation_gc_id;
|
||||||
data.iov_len = (chunk + 1) * sizeof(pgno_t);
|
data.iov_len = (chunk + 1) * sizeof(pgno_t);
|
||||||
mdbx_trace("%s.reserve: %u [%u...%u) @%" PRIaTXN, dbg_prefix_mode, chunk,
|
mdbx_trace("%s: reserve %u [%u...%u) @%" PRIaTXN, dbg_prefix_mode, chunk,
|
||||||
settled + 1, settled + chunk + 1, reservation_gc_id);
|
settled + 1, settled + chunk + 1, reservation_gc_id);
|
||||||
mdbx_prep_backlog(txn, &couple.outer, data.iov_len);
|
mdbx_prep_backlog(txn, &couple.outer, data.iov_len);
|
||||||
rc = mdbx_cursor_put(&couple.outer, &key, &data,
|
rc = mdbx_cursor_put(&couple.outer, &key, &data,
|
||||||
@ -9294,7 +9295,7 @@ retry_noaccount:
|
|||||||
|
|
||||||
clean_reserved_gc_pnl(env, data);
|
clean_reserved_gc_pnl(env, data);
|
||||||
settled += chunk;
|
settled += chunk;
|
||||||
mdbx_trace("%s.settled %u (+%u), continue", dbg_prefix_mode, settled,
|
mdbx_trace("%s: settled %u (+%u), continue", dbg_prefix_mode, settled,
|
||||||
chunk);
|
chunk);
|
||||||
|
|
||||||
if (txn->tw.lifo_reclaimed &&
|
if (txn->tw.lifo_reclaimed &&
|
||||||
@ -9364,7 +9365,7 @@ retry_noaccount:
|
|||||||
goto retry;
|
goto retry;
|
||||||
}
|
}
|
||||||
fill_gc_id = txn->tw.lifo_reclaimed[filled_gc_slot];
|
fill_gc_id = txn->tw.lifo_reclaimed[filled_gc_slot];
|
||||||
mdbx_trace("%s.seek-reservation @%" PRIaTXN " at lifo_reclaimed[%u]",
|
mdbx_trace("%s: seek-reservation @%" PRIaTXN " at lifo_reclaimed[%u]",
|
||||||
dbg_prefix_mode, fill_gc_id, filled_gc_slot);
|
dbg_prefix_mode, fill_gc_id, filled_gc_slot);
|
||||||
key.iov_base = &fill_gc_id;
|
key.iov_base = &fill_gc_id;
|
||||||
key.iov_len = sizeof(fill_gc_id);
|
key.iov_len = sizeof(fill_gc_id);
|
||||||
@ -9428,7 +9429,7 @@ retry_noaccount:
|
|||||||
pgno_t *src = MDBX_PNL_BEGIN(txn->tw.reclaimed_pglist) + left - chunk;
|
pgno_t *src = MDBX_PNL_BEGIN(txn->tw.reclaimed_pglist) + left - chunk;
|
||||||
memcpy(dst, src, chunk * sizeof(pgno_t));
|
memcpy(dst, src, chunk * sizeof(pgno_t));
|
||||||
pgno_t *from = src, *to = src + chunk;
|
pgno_t *from = src, *to = src + chunk;
|
||||||
mdbx_trace("%s.fill: %u [ %u:%" PRIaPGNO "...%u:%" PRIaPGNO
|
mdbx_trace("%s: fill %u [ %u:%" PRIaPGNO "...%u:%" PRIaPGNO
|
||||||
"] @%" PRIaTXN,
|
"] @%" PRIaTXN,
|
||||||
dbg_prefix_mode, chunk,
|
dbg_prefix_mode, chunk,
|
||||||
(unsigned)(from - txn->tw.reclaimed_pglist), from[0],
|
(unsigned)(from - txn->tw.reclaimed_pglist), from[0],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user