mdbx: refactoring fetch/refresh/create/open tables and DBI-handles.

The (rare, quirky) scenario of recreating a previously opened and used table/DBI-handle
after it has been deleted by another process is now supported.
This commit is contained in:
Леонид Юрьев (Leonid Yuriev)
2025-11-06 10:26:28 +03:00
parent 207fc11d76
commit a17e041830
11 changed files with 246 additions and 150 deletions

View File

@@ -241,7 +241,7 @@ __cold int mdbx_dbi_stat(const MDBX_txn *txn, MDBX_dbi dbi, MDBX_stat *dest, siz
return LOG_IFERR(MDBX_BAD_TXN);
if (unlikely(txn->dbi_state[dbi] & DBI_STALE)) {
rc = tbl_fetch((MDBX_txn *)txn, dbi);
rc = tbl_refresh((MDBX_txn *)txn, dbi);
if (unlikely(rc != MDBX_SUCCESS))
return LOG_IFERR(rc);
}