mdbx: merge branch master into devel.

This commit is contained in:
Леонид Юрьев (Leonid Yuriev) 2022-08-07 12:42:43 +03:00
commit d62d3e2aab
3 changed files with 23 additions and 14 deletions

View File

@ -24,11 +24,16 @@ Not a release but preparation for changing feature set and API.
-------------------------------------------------------------------------------
## v0.11.9 (Чирчик-1992) scheduled to 2022-08-02
## v0.11.9 (Чирчик-1992) at 2022-08-02
The stable bugfix release.
It is planned that this will be the last release of the v0.11 branch.
```
18 files changed, 318 insertions(+), 178 deletions(-)
Signed-off-by: Леонид Юрьев (Leonid Yuriev) <leo@yuriev.ru>
```
Acknowledgements:
- [Alex Sharov](https://github.com/AskAlexSharov) and Erigon team for reporting and testing.

View File

@ -812,13 +812,13 @@ else
define bench-rule
bench-$(1)_$(2).txt: $(3) $(IOARENA) $(lastword $(MAKEFILE_LIST))
@echo ' RUNNING ioarena for $1/$2...'
$(QUIET)LD_LIBRARY_PATH="./:$$$${LD_LIBRARY_PATH}" \
$(QUIET)(export LD_LIBRARY_PATH="./:$$$${LD_LIBRARY_PATH}"; \
ldd $(IOARENA) && \
$(IOARENA) -D $(1) -B crud -m $(BENCH_CRUD_MODE) -n $(2) \
| tee $$@ | grep throughput && \
LD_LIBRARY_PATH="./:$$$${LD_LIBRARY_PATH}" \
$(IOARENA) -D $(1) -B get,iterate -m $(BENCH_CRUD_MODE) -r 4 -n $(2) \
| tee -a $$@ | grep throughput \
|| mv -f $$@ $$@.error
| tee $$@ | grep throughput && \
$(IOARENA) -D $(1) -B iterate,get,iterate,get,iterate -m $(BENCH_CRUD_MODE) -r 4 -n $(2) \
| tee -a $$@ | grep throughput \
) || mv -f $$@ $$@.error
endef

View File

@ -7447,9 +7447,9 @@ static bool meta_checktxnid(const MDBX_env *env, const volatile MDBX_meta *meta,
if (unlikely(root_txnid != freedb_mod_txnid)) {
if (report)
mdbx_warning(
"catch invalid root_page_txnid %" PRIaTXN
"catch invalid root_page %" PRIaPGNO " mod_txnid %" PRIaTXN
" for %sdb.mod_txnid %" PRIaTXN " %s",
root_txnid, "free", freedb_mod_txnid,
freedb_root_pgno, root_txnid, "free", freedb_mod_txnid,
"(workaround for incoherent flaw of unified page/buffer cache)");
ok = false;
}
@ -7462,9 +7462,9 @@ static bool meta_checktxnid(const MDBX_env *env, const volatile MDBX_meta *meta,
if (unlikely(root_txnid != maindb_mod_txnid)) {
if (report)
mdbx_warning(
"catch invalid root_page_txnid %" PRIaTXN
"catch invalid root_page %" PRIaPGNO " mod_txnid %" PRIaTXN
" for %sdb.mod_txnid %" PRIaTXN " %s",
root_txnid, "main", maindb_mod_txnid,
maindb_root_pgno, root_txnid, "main", maindb_mod_txnid,
"(workaround for incoherent flaw of unified page/buffer cache)");
ok = false;
}
@ -7824,13 +7824,17 @@ static __always_inline int check_txn(const MDBX_txn *txn, int bad_bits) {
if (unlikely(txn->mt_flags & bad_bits))
return MDBX_BAD_TXN;
mdbx_tassert(txn, (txn->mt_flags & MDBX_NOTLS) ==
((txn->mt_flags & MDBX_TXN_RDONLY)
? txn->mt_env->me_flags & MDBX_NOTLS
: 0));
#if MDBX_TXN_CHECKOWNER
if ((txn->mt_flags & MDBX_NOTLS) == 0 &&
unlikely(txn->mt_owner != mdbx_thread_self()))
if (unlikely(txn->mt_owner != mdbx_thread_self()) &&
(txn->mt_flags & (MDBX_NOTLS | MDBX_TXN_FINISHED)) == 0)
return txn->mt_owner ? MDBX_THREAD_MISMATCH : MDBX_BAD_TXN;
#endif /* MDBX_TXN_CHECKOWNER */
if (unlikely(!txn->mt_env->me_map))
if (bad_bits && unlikely(!txn->mt_env->me_map))
return MDBX_EPERM;
return MDBX_SUCCESS;