mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-04 17:14:12 +08:00
mdbx: remove "" from debug-strings.
Change-Id: I27f9052e2d2e318f4386f40f17c321e8cbf005c0
This commit is contained in:
parent
d299a2601d
commit
c945359858
52
src/mdbx.c
52
src/mdbx.c
@ -2408,7 +2408,7 @@ static int mdbx_page_alloc(MDBX_cursor *mc, unsigned num, MDBX_page **mp,
|
||||
last, txn->mt_dbs[FREE_DBI].md_root, repg_pos);
|
||||
unsigned i;
|
||||
for (i = repg_pos; i; i--)
|
||||
mdbx_debug_extra_print(" %" PRIaPGNO "", re_pnl[i]);
|
||||
mdbx_debug_extra_print(" %" PRIaPGNO, re_pnl[i]);
|
||||
mdbx_debug_extra_print("\n");
|
||||
}
|
||||
|
||||
@ -2511,7 +2511,7 @@ static int mdbx_page_alloc(MDBX_cursor *mc, unsigned num, MDBX_page **mp,
|
||||
* just for resume reclaiming only, not for data consistency. */
|
||||
|
||||
mdbx_debug("kick-gc: head %" PRIaTXN "-%s, tail %" PRIaTXN
|
||||
"-%s, oldest %" PRIaTXN "",
|
||||
"-%s, oldest %" PRIaTXN,
|
||||
mdbx_meta_txnid_stable(env, head), mdbx_durable_str(head),
|
||||
mdbx_meta_txnid_stable(env, steady),
|
||||
mdbx_durable_str(steady), oldest);
|
||||
@ -3920,7 +3920,7 @@ retry:
|
||||
" num %u, PNL",
|
||||
txn->mt_txnid, txn->mt_dbs[FREE_DBI].md_root, i);
|
||||
for (; i; i--)
|
||||
mdbx_debug_extra_print(" %" PRIaPGNO "", txn->mt_befree_pages[i]);
|
||||
mdbx_debug_extra_print(" %" PRIaPGNO, txn->mt_befree_pages[i]);
|
||||
mdbx_debug_extra_print("\n");
|
||||
}
|
||||
continue;
|
||||
@ -4328,7 +4328,7 @@ static int mdbx_page_flush(MDBX_txn *txn, pgno_t keep) {
|
||||
wpos = pos;
|
||||
wsize = 0;
|
||||
}
|
||||
mdbx_debug("committing page %" PRIaPGNO "", pgno);
|
||||
mdbx_debug("committing page %" PRIaPGNO, pgno);
|
||||
next_pos = pos + size;
|
||||
iov[n].iov_len = size;
|
||||
iov[n].iov_base = (char *)dp;
|
||||
@ -6289,15 +6289,15 @@ int __cold mdbx_env_open(MDBX_env *env, const char *path, unsigned flags,
|
||||
|
||||
mdbx_debug("opened database version %u, pagesize %u",
|
||||
(uint8_t)meta->mm_magic_and_version, env->me_psize);
|
||||
mdbx_debug("using meta page %" PRIaPGNO ", txn %" PRIaTXN "",
|
||||
mdbx_debug("using meta page %" PRIaPGNO ", txn %" PRIaTXN,
|
||||
container_of(meta, MDBX_page, mp_data)->mp_pgno,
|
||||
mdbx_meta_txnid_fluid(env, meta));
|
||||
mdbx_debug("depth: %u", db->md_depth);
|
||||
mdbx_debug("entries: %" PRIu64 "", db->md_entries);
|
||||
mdbx_debug("branch pages: %" PRIaPGNO "", db->md_branch_pages);
|
||||
mdbx_debug("leaf pages: %" PRIaPGNO "", db->md_leaf_pages);
|
||||
mdbx_debug("overflow pages: %" PRIaPGNO "", db->md_overflow_pages);
|
||||
mdbx_debug("root: %" PRIaPGNO "", db->md_root);
|
||||
mdbx_debug("entries: %" PRIu64, db->md_entries);
|
||||
mdbx_debug("branch pages: %" PRIaPGNO, db->md_branch_pages);
|
||||
mdbx_debug("leaf pages: %" PRIaPGNO, db->md_leaf_pages);
|
||||
mdbx_debug("overflow pages: %" PRIaPGNO, db->md_overflow_pages);
|
||||
mdbx_debug("root: %" PRIaPGNO, db->md_root);
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -6576,7 +6576,7 @@ static MDBX_node *__hot mdbx_node_search(MDBX_cursor *mc, MDBX_val *key,
|
||||
|
||||
const unsigned nkeys = NUMKEYS(mp);
|
||||
|
||||
mdbx_debug("searching %u keys in %s %spage %" PRIaPGNO "", nkeys,
|
||||
mdbx_debug("searching %u keys in %s %spage %" PRIaPGNO, nkeys,
|
||||
IS_LEAF(mp) ? "leaf" : "branch", IS_SUBP(mp) ? "sub-" : "",
|
||||
mp->mp_pgno);
|
||||
|
||||
@ -6779,7 +6779,7 @@ static int mdbx_page_search_root(MDBX_cursor *mc, MDBX_val *key, int flags) {
|
||||
* while in the process of rebalancing a FreeDB branch page; we must
|
||||
* let that proceed. ITS#8336 */
|
||||
mdbx_cassert(mc, !mc->mc_dbi || NUMKEYS(mp) > 1);
|
||||
mdbx_debug("found index 0 to page %" PRIaPGNO "", NODEPGNO(NODEPTR(mp, 0)));
|
||||
mdbx_debug("found index 0 to page %" PRIaPGNO, NODEPGNO(NODEPTR(mp, 0)));
|
||||
|
||||
if (flags & (MDBX_PS_FIRST | MDBX_PS_LAST)) {
|
||||
i = 0;
|
||||
@ -8840,7 +8840,7 @@ static int __must_check_result mdbx_node_add_leaf(MDBX_cursor *mc,
|
||||
int rc = mdbx_page_new(mc, P_OVERFLOW, ovpages, &largepage);
|
||||
if (unlikely(rc != MDBX_SUCCESS))
|
||||
return rc;
|
||||
mdbx_debug("allocated overflow page %" PRIaPGNO "", largepage->mp_pgno);
|
||||
mdbx_debug("allocated overflow page %" PRIaPGNO, largepage->mp_pgno);
|
||||
flags |= F_BIGDATA;
|
||||
node_size += sizeof(pgno_t);
|
||||
mdbx_cassert(mc, mdbx_leaf_size(mc->mc_txn->mt_env, key, data) ==
|
||||
@ -8963,7 +8963,7 @@ static int mdbx_node_add(MDBX_cursor *mc, unsigned indx, const MDBX_val *key,
|
||||
goto full;
|
||||
if ((rc = mdbx_page_new(mc, P_OVERFLOW, ovpages, &ofp)))
|
||||
return rc;
|
||||
mdbx_debug("allocated overflow page %" PRIaPGNO "", ofp->mp_pgno);
|
||||
mdbx_debug("allocated overflow page %" PRIaPGNO, ofp->mp_pgno);
|
||||
flags |= F_BIGDATA;
|
||||
goto update;
|
||||
} else {
|
||||
@ -9023,9 +9023,9 @@ update:
|
||||
full:
|
||||
mdbx_debug("not enough room in page %" PRIaPGNO ", got %u ptrs", mp->mp_pgno,
|
||||
NUMKEYS(mp));
|
||||
mdbx_debug("upper-lower = %u - %u = %" PRIiPTR "", mp->mp_upper, mp->mp_lower,
|
||||
mdbx_debug("upper-lower = %u - %u = %" PRIiPTR, mp->mp_upper, mp->mp_lower,
|
||||
room);
|
||||
mdbx_debug("node size = %" PRIuPTR "", node_size);
|
||||
mdbx_debug("node size = %" PRIuPTR, node_size);
|
||||
mc->mc_txn->mt_flags |= MDBX_TXN_ERROR;
|
||||
return MDBX_PAGE_FULL;
|
||||
}
|
||||
@ -9042,7 +9042,7 @@ static void mdbx_node_del(MDBX_cursor *mc, size_t ksize) {
|
||||
MDBX_node *node;
|
||||
char *base;
|
||||
|
||||
mdbx_debug("delete node %u on %s page %" PRIaPGNO "", indx,
|
||||
mdbx_debug("delete node %u on %s page %" PRIaPGNO, indx,
|
||||
IS_LEAF(mp) ? "leaf" : "branch", mp->mp_pgno);
|
||||
numkeys = NUMKEYS(mp);
|
||||
mdbx_cassert(mc, indx < numkeys);
|
||||
@ -9213,7 +9213,7 @@ static int mdbx_xcursor_init1(MDBX_cursor *mc, MDBX_node *node) {
|
||||
mx->mx_db.md_flags |= MDBX_INTEGERKEY;
|
||||
}
|
||||
}
|
||||
mdbx_debug("Sub-db -%u root page %" PRIaPGNO "", mx->mx_cursor.mc_dbi,
|
||||
mdbx_debug("Sub-db -%u root page %" PRIaPGNO, mx->mx_cursor.mc_dbi,
|
||||
mx->mx_db.md_root);
|
||||
mx->mx_dbflag = DB_VALID | DB_USRVALID | DB_DUPDATA;
|
||||
/* FIXME: #if UINT_MAX < SIZE_MAX
|
||||
@ -9251,7 +9251,7 @@ static int mdbx_xcursor_init2(MDBX_cursor *mc, MDBX_xcursor *src_mx,
|
||||
}
|
||||
mx->mx_db = src_mx->mx_db;
|
||||
mx->mx_cursor.mc_pg[0] = src_mx->mx_cursor.mc_pg[0];
|
||||
mdbx_debug("Sub-db -%u root page %" PRIaPGNO "", mx->mx_cursor.mc_dbi,
|
||||
mdbx_debug("Sub-db -%u root page %" PRIaPGNO, mx->mx_cursor.mc_dbi,
|
||||
mx->mx_db.md_root);
|
||||
return MDBX_SUCCESS;
|
||||
}
|
||||
@ -9481,8 +9481,8 @@ static int mdbx_update_key(MDBX_cursor *mc, const MDBX_val *key) {
|
||||
char kbuf2[DKBUF_MAXKEYSIZE * 2 + 1];
|
||||
k2.iov_base = NODEKEY(node);
|
||||
k2.iov_len = node->mn_ksize;
|
||||
mdbx_debug("update key %u (ofs %u) [%s] to [%s] on page %" PRIaPGNO "",
|
||||
indx, ptr, mdbx_dkey(&k2, kbuf2, sizeof(kbuf2)), DKEY(key),
|
||||
mdbx_debug("update key %u (ofs %u) [%s] to [%s] on page %" PRIaPGNO, indx,
|
||||
ptr, mdbx_dkey(&k2, kbuf2, sizeof(kbuf2)), DKEY(key),
|
||||
mp->mp_pgno);
|
||||
}
|
||||
|
||||
@ -9817,7 +9817,7 @@ static int mdbx_page_merge(MDBX_cursor *csrc, MDBX_cursor *cdst) {
|
||||
MDBX_page *const psrc = csrc->mc_pg[csrc->mc_top];
|
||||
MDBX_page *const pdst = cdst->mc_pg[cdst->mc_top];
|
||||
|
||||
mdbx_debug("merging page %" PRIaPGNO " into %" PRIaPGNO "", psrc->mp_pgno,
|
||||
mdbx_debug("merging page %" PRIaPGNO " into %" PRIaPGNO, psrc->mp_pgno,
|
||||
pdst->mp_pgno);
|
||||
|
||||
mdbx_cassert(csrc, PAGETYPE(psrc) == PAGETYPE(pdst));
|
||||
@ -10545,7 +10545,7 @@ static int mdbx_page_split(MDBX_cursor *mc, const MDBX_val *newkey,
|
||||
if ((rc = mdbx_page_new(mc, mp->mp_flags, 1, &rp)))
|
||||
return rc;
|
||||
rp->mp_leaf2_ksize = mp->mp_leaf2_ksize;
|
||||
mdbx_debug("new right sibling: page %" PRIaPGNO "", rp->mp_pgno);
|
||||
mdbx_debug("new right sibling: page %" PRIaPGNO, rp->mp_pgno);
|
||||
|
||||
/* Usually when splitting the root page, the cursor
|
||||
* height is 1. But when called from mdbx_update_key,
|
||||
@ -10563,7 +10563,7 @@ static int mdbx_page_split(MDBX_cursor *mc, const MDBX_val *newkey,
|
||||
mc->mc_pg[0] = pp;
|
||||
mc->mc_ki[0] = 0;
|
||||
mc->mc_db->md_root = pp->mp_pgno;
|
||||
mdbx_debug("root split! new root = %" PRIaPGNO "", pp->mp_pgno);
|
||||
mdbx_debug("root split! new root = %" PRIaPGNO, pp->mp_pgno);
|
||||
foliage = mc->mc_db->md_depth++;
|
||||
|
||||
/* Add left (implicit) pointer. */
|
||||
@ -10581,7 +10581,7 @@ static int mdbx_page_split(MDBX_cursor *mc, const MDBX_val *newkey,
|
||||
ptop = 0;
|
||||
} else {
|
||||
ptop = mc->mc_top - 1;
|
||||
mdbx_debug("parent branch page is %" PRIaPGNO "", mc->mc_pg[ptop]->mp_pgno);
|
||||
mdbx_debug("parent branch page is %" PRIaPGNO, mc->mc_pg[ptop]->mp_pgno);
|
||||
}
|
||||
|
||||
mdbx_cursor_copy(mc, &mn);
|
||||
@ -12352,7 +12352,7 @@ int __cold mdbx_reader_check0(MDBX_env *env, int rdt_locked, int *dead) {
|
||||
/* clean it */
|
||||
for (unsigned j = i; j < snap_nreaders; j++) {
|
||||
if (lck->mti_readers[j].mr_pid == pid) {
|
||||
mdbx_debug("clear stale reader pid %" PRIuPTR " txn %" PRIaTXN "",
|
||||
mdbx_debug("clear stale reader pid %" PRIuPTR " txn %" PRIaTXN,
|
||||
(size_t)pid, lck->mti_readers[j].mr_txnid);
|
||||
lck->mti_readers[j].mr_pid = 0;
|
||||
lck->mti_readers_refresh_flag = true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user