mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-30 22:47:16 +08:00
mdbx: merge branch master
into devel
.
This commit is contained in:
commit
d62d3e2aab
@ -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.
|
The stable bugfix release.
|
||||||
It is planned that this will be the last release of the v0.11 branch.
|
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:
|
Acknowledgements:
|
||||||
|
|
||||||
- [Alex Sharov](https://github.com/AskAlexSharov) and Erigon team for reporting and testing.
|
- [Alex Sharov](https://github.com/AskAlexSharov) and Erigon team for reporting and testing.
|
||||||
|
12
GNUmakefile
12
GNUmakefile
@ -812,13 +812,13 @@ else
|
|||||||
define bench-rule
|
define bench-rule
|
||||||
bench-$(1)_$(2).txt: $(3) $(IOARENA) $(lastword $(MAKEFILE_LIST))
|
bench-$(1)_$(2).txt: $(3) $(IOARENA) $(lastword $(MAKEFILE_LIST))
|
||||||
@echo ' RUNNING ioarena for $1/$2...'
|
@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) \
|
$(IOARENA) -D $(1) -B crud -m $(BENCH_CRUD_MODE) -n $(2) \
|
||||||
| tee $$@ | grep throughput && \
|
| tee $$@ | grep throughput && \
|
||||||
LD_LIBRARY_PATH="./:$$$${LD_LIBRARY_PATH}" \
|
$(IOARENA) -D $(1) -B iterate,get,iterate,get,iterate -m $(BENCH_CRUD_MODE) -r 4 -n $(2) \
|
||||||
$(IOARENA) -D $(1) -B get,iterate -m $(BENCH_CRUD_MODE) -r 4 -n $(2) \
|
| tee -a $$@ | grep throughput \
|
||||||
| tee -a $$@ | grep throughput \
|
) || mv -f $$@ $$@.error
|
||||||
|| mv -f $$@ $$@.error
|
|
||||||
|
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
18
src/core.c
18
src/core.c
@ -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 (unlikely(root_txnid != freedb_mod_txnid)) {
|
||||||
if (report)
|
if (report)
|
||||||
mdbx_warning(
|
mdbx_warning(
|
||||||
"catch invalid root_page_txnid %" PRIaTXN
|
"catch invalid root_page %" PRIaPGNO " mod_txnid %" PRIaTXN
|
||||||
" for %sdb.mod_txnid %" PRIaTXN " %s",
|
" 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)");
|
"(workaround for incoherent flaw of unified page/buffer cache)");
|
||||||
ok = false;
|
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 (unlikely(root_txnid != maindb_mod_txnid)) {
|
||||||
if (report)
|
if (report)
|
||||||
mdbx_warning(
|
mdbx_warning(
|
||||||
"catch invalid root_page_txnid %" PRIaTXN
|
"catch invalid root_page %" PRIaPGNO " mod_txnid %" PRIaTXN
|
||||||
" for %sdb.mod_txnid %" PRIaTXN " %s",
|
" 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)");
|
"(workaround for incoherent flaw of unified page/buffer cache)");
|
||||||
ok = false;
|
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))
|
if (unlikely(txn->mt_flags & bad_bits))
|
||||||
return MDBX_BAD_TXN;
|
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 MDBX_TXN_CHECKOWNER
|
||||||
if ((txn->mt_flags & MDBX_NOTLS) == 0 &&
|
if (unlikely(txn->mt_owner != mdbx_thread_self()) &&
|
||||||
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;
|
return txn->mt_owner ? MDBX_THREAD_MISMATCH : MDBX_BAD_TXN;
|
||||||
#endif /* MDBX_TXN_CHECKOWNER */
|
#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_EPERM;
|
||||||
|
|
||||||
return MDBX_SUCCESS;
|
return MDBX_SUCCESS;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user