mdbx: more spelling.

Change-Id: I45e42c1d8ef51f910b8e41279b92e54a6b2ce772
This commit is contained in:
Leonid Yuriev 2020-10-20 15:42:50 +03:00
parent 603e250745
commit b964b2abf5
15 changed files with 91 additions and 76 deletions

View File

@ -133,6 +133,7 @@ cadabra
callergraph callergraph
callgraph callgraph
calloc calloc
cas
casename casename
cassert cassert
castortech castortech
@ -250,6 +251,7 @@ dbiseqs
dbistate dbistate
dbm dbm
dbpath dbpath
dbs
dbsize dbsize
dbstate dbstate
DBT DBT
@ -326,6 +328,7 @@ dpage
DPK DPK
dpl dpl
dprefix dprefix
DPs
dqiqg dqiqg
dreamsxin dreamsxin
dsize dsize
@ -427,6 +430,7 @@ errcode
errno errno
errnum errnum
ERRORCHECK ERRORCHECK
errored
erthink erthink
esac esac
eturn eturn
@ -554,6 +558,7 @@ gitdir
github github
githubusercontent githubusercontent
glibc glibc
globals
gmail gmail
gmake gmake
gmx gmx
@ -649,6 +654,7 @@ indx
INDXSIZE INDXSIZE
ini ini
initd initd
INITED
initialiser initialiser
inl inl
inlined inlined
@ -661,6 +667,7 @@ interprocedural
intlimits intlimits
intptr intptr
intrin intrin
intrinsics
inttypes inttypes
ioarena ioarena
IODQ IODQ
@ -735,6 +742,7 @@ klen
KMGTPEZY KMGTPEZY
knipp knipp
kp kp
ks
ksize ksize
kstat kstat
kurt kurt
@ -849,6 +857,7 @@ mathjax
mattr mattr
MAXDATASIZE MAXDATASIZE
maxdbs maxdbs
maxed
maxgc maxgc
maxkey maxkey
maxkeysize maxkeysize
@ -1386,6 +1395,7 @@ semctl
semget semget
semid semid
semop semop
sems
sendfile sendfile
sepkey sepkey
SETALL SETALL
@ -1408,6 +1418,7 @@ Shipitsin
shm shm
showinitializer showinitializer
showned showned
shrinked
sideeffect sideeffect
sigaction sigaction
sigaddset sigaddset
@ -1513,6 +1524,7 @@ strstr
strtol strtol
strtoul strtoul
strtoull strtoull
structs
stylesheet stylesheet
subalign subalign
SUBDATA SUBDATA
@ -1663,6 +1675,7 @@ unregister
unspill unspill
unsync unsync
UNTRACK UNTRACK
updation
upsert upsert
UPSERTING UPSERTING
upsertion upsertion
@ -1697,6 +1710,7 @@ valuemode
vasprintf vasprintf
vedisdb vedisdb
VERINFO VERINFO
versioned
versioning versioning
Veyor Veyor
vfprintf vfprintf
@ -1745,6 +1759,7 @@ WIFSTOPPED
wiki wiki
wikipedia wikipedia
wiktionary wiktionary
wildcards
WILLNEED WILLNEED
WINAPI WINAPI
windowsbug windowsbug

View File

@ -87,7 +87,7 @@ ifeq ($(wildcard mdbx.c),mdbx.c)
#< dist-cutoff-end #< dist-cutoff-end
################################################################################ ################################################################################
# Amalgamated source code, i.e. distributed after `make dists` # Amalgamated source code, i.e. distributed after `make dist`
MAN_SRCDIR := man1/ MAN_SRCDIR := man1/
config.h: mdbx.c $(lastword $(MAKEFILE_LIST)) config.h: mdbx.c $(lastword $(MAKEFILE_LIST))

View File

@ -17,8 +17,8 @@ cmake_minimum_required(VERSION 3.8.2)
cmake_policy(PUSH) cmake_policy(PUSH)
cmake_policy(VERSION 3.8.2) cmake_policy(VERSION 3.8.2)
macro(add_compile_flags langs) macro(add_compile_flags languages)
foreach(_lang ${langs}) foreach(_lang ${languages})
string(REPLACE ";" " " _flags "${ARGN}") string(REPLACE ";" " " _flags "${ARGN}")
if(CMAKE_CXX_COMPILER_LOADED AND _lang STREQUAL "CXX") if(CMAKE_CXX_COMPILER_LOADED AND _lang STREQUAL "CXX")
set("${_lang}_FLAGS" "${${_lang}_FLAGS} ${_flags}") set("${_lang}_FLAGS" "${${_lang}_FLAGS} ${_flags}")

6
mdbx.h
View File

@ -1245,7 +1245,7 @@ enum MDBX_env_flags_t {
* - a system crash immediately after commit the write transaction * - a system crash immediately after commit the write transaction
* high likely lead to database corruption. * high likely lead to database corruption.
* - successful completion of mdbx_env_sync(force = true) after one or * - successful completion of mdbx_env_sync(force = true) after one or
* more commited transactions guarantees consistency and durability. * more committed transactions guarantees consistency and durability.
* - BUT by committing two or more transactions you back database into * - BUT by committing two or more transactions you back database into
* a weak state, in which a system crash may lead to database corruption! * a weak state, in which a system crash may lead to database corruption!
* In case single transaction after mdbx_env_sync, you may lose transaction * In case single transaction after mdbx_env_sync, you may lose transaction
@ -1954,7 +1954,7 @@ struct MDBX_stat {
uint64_t ms_leaf_pages; /**< Number of leaf pages */ uint64_t ms_leaf_pages; /**< Number of leaf pages */
uint64_t ms_overflow_pages; /**< Number of overflow pages */ uint64_t ms_overflow_pages; /**< Number of overflow pages */
uint64_t ms_entries; /**< Number of data items */ uint64_t ms_entries; /**< Number of data items */
uint64_t ms_mod_txnid; /**< Transaction ID of commited last modification */ uint64_t ms_mod_txnid; /**< Transaction ID of committed last modification */
}; };
#ifndef __cplusplus #ifndef __cplusplus
/** \ingroup c_statinfo */ /** \ingroup c_statinfo */
@ -4398,7 +4398,7 @@ LIBMDBX_API int mdbx_thread_unregister(const MDBX_env *env);
* \param [in] pid A pid of the reader process. * \param [in] pid A pid of the reader process.
* \param [in] tid A thread_id of the reader thread. * \param [in] tid A thread_id of the reader thread.
* \param [in] laggard An oldest read transaction number on which stalled. * \param [in] laggard An oldest read transaction number on which stalled.
* \param [in] gap A lag from the last commited txn. * \param [in] gap A lag from the last committed txn.
* \param [in] space A space that actually become available for reuse after * \param [in] space A space that actually become available for reuse after
* this reader finished. The callback function can take * this reader finished. The callback function can take
* this value into account to evaluate the impact that * this value into account to evaluate the impact that

View File

@ -2081,7 +2081,7 @@ public:
/// \ref MDBX_BAD_DBI (since the DB name is gone). /// \ref MDBX_BAD_DBI (since the DB name is gone).
inline void close_map(const map_handle &); inline void close_map(const map_handle &);
/// \brief Readed information /// \brief Reader information
struct reader_info { struct reader_info {
int slot; ///< The reader lock table slot number. int slot; ///< The reader lock table slot number.
mdbx_pid_t pid; ///< The reader process ID. mdbx_pid_t pid; ///< The reader process ID.

View File

@ -38,7 +38,7 @@
#include "internals.h" #include "internals.h"
/*------------------------------------------------------------------------------ /*------------------------------------------------------------------------------
* Internal inlines */ * Internal inline functions */
MDBX_NOTHROW_CONST_FUNCTION static unsigned log2n(size_t value) { MDBX_NOTHROW_CONST_FUNCTION static unsigned log2n(size_t value) {
assert(value > 0 && value < INT32_MAX && is_powerof2(value)); assert(value > 0 && value < INT32_MAX && is_powerof2(value));
@ -3584,7 +3584,7 @@ static __maybe_unused void mdbx_page_list(MDBX_page *mp) {
/*----------------------------------------------------------------------------*/ /*----------------------------------------------------------------------------*/
/* Check if there is an inited xcursor, so XCURSOR_REFRESH() is proper */ /* Check if there is an initialized xcursor, so XCURSOR_REFRESH() is proper */
#define XCURSOR_INITED(mc) \ #define XCURSOR_INITED(mc) \
((mc)->mc_xcursor && ((mc)->mc_xcursor->mx_cursor.mc_flags & C_INITIALIZED)) ((mc)->mc_xcursor && ((mc)->mc_xcursor->mx_cursor.mc_flags & C_INITIALIZED))
@ -11057,7 +11057,7 @@ static int __hot cmp_int_align2(const MDBX_val *a, const MDBX_val *b) {
} }
} }
/* Compare two items pointing at unsigneds of unknown alignment. /* Compare two items pointing at unsigned values with unknown alignment.
* *
* This is also set as MDBX_INTEGERDUP|MDBX_DUPFIXED's MDBX_dbx.md_dcmp. */ * This is also set as MDBX_INTEGERDUP|MDBX_DUPFIXED's MDBX_dbx.md_dcmp. */
static int __hot cmp_int_unaligned(const MDBX_val *a, const MDBX_val *b) { static int __hot cmp_int_unaligned(const MDBX_val *a, const MDBX_val *b) {
@ -14197,8 +14197,8 @@ static int mdbx_update_key(MDBX_cursor *mc, const MDBX_val *key) {
char kbuf2[DKBUF_MAXKEYSIZE * 2 + 1]; char kbuf2[DKBUF_MAXKEYSIZE * 2 + 1];
k2.iov_base = node_key(node); k2.iov_base = node_key(node);
k2.iov_len = node_ks(node); k2.iov_len = node_ks(node);
mdbx_debug("update key %u (ofs %u) [%s] to [%s] on page %" PRIaPGNO, indx, mdbx_debug("update key %u (offset %u) [%s] to [%s] on page %" PRIaPGNO,
ptr, mdbx_dump_val(&k2, kbuf2, sizeof(kbuf2)), DKEY(key), indx, ptr, mdbx_dump_val(&k2, kbuf2, sizeof(kbuf2)), DKEY(key),
mp->mp_pgno); mp->mp_pgno);
} }

View File

@ -287,7 +287,7 @@ typedef struct MDBX_db {
pgno_t md_overflow_pages; /* number of overflow pages */ pgno_t md_overflow_pages; /* number of overflow pages */
uint64_t md_seq; /* table sequence counter */ uint64_t md_seq; /* table sequence counter */
uint64_t md_entries; /* number of data items */ uint64_t md_entries; /* number of data items */
uint64_t md_mod_txnid; /* txnid of last commited modification */ uint64_t md_mod_txnid; /* txnid of last committed modification */
} MDBX_db; } MDBX_db;
/* database size-related parameters */ /* database size-related parameters */
@ -943,7 +943,7 @@ struct MDBX_env {
#define me_lfd me_lck_mmap.fd #define me_lfd me_lck_mmap.fd
#define me_lck me_lck_mmap.lck #define me_lck me_lck_mmap.lck
unsigned me_psize; /* DB page size, inited from me_os_psize */ unsigned me_psize; /* DB page size, initialized from me_os_psize */
uint8_t me_psize2log; /* log2 of DB page size */ uint8_t me_psize2log; /* log2 of DB page size */
int8_t me_stuck_meta; /* recovery-only: target meta page or less that zero */ int8_t me_stuck_meta; /* recovery-only: target meta page or less that zero */
unsigned me_os_psize; /* OS page size, from mdbx_syspagesize() */ unsigned me_os_psize; /* OS page size, from mdbx_syspagesize() */

View File

@ -678,7 +678,7 @@ int main(int argc, char *argv[]) {
if (present_sequence > sequence) { if (present_sequence > sequence) {
fprintf(stderr, fprintf(stderr,
"present sequence for '%s' value (%" PRIu64 "present sequence for '%s' value (%" PRIu64
") is greated than loaded (%" PRIu64 ")\n", ") is greater than loaded (%" PRIu64 ")\n",
dbi_name, present_sequence, sequence); dbi_name, present_sequence, sequence);
rc = MDBX_RESULT_TRUE; rc = MDBX_RESULT_TRUE;
goto txn_abort; goto txn_abort;

View File

@ -283,7 +283,7 @@ typedef pthread_mutex_t mdbx_fastmutex_t;
defined(__amd64__) || defined(__amd64) || defined(_M_X64) || \ defined(__amd64__) || defined(__amd64) || defined(_M_X64) || \
defined(_M_AMD64) || defined(__IA32__) || defined(__INTEL__) defined(_M_AMD64) || defined(__IA32__) || defined(__INTEL__)
#ifndef __ia32__ #ifndef __ia32__
/* LY: define neutral __ia32__ for x86 and x86-64 archs */ /* LY: define neutral __ia32__ for x86 and x86-64 */
#define __ia32__ 1 #define __ia32__ 1
#endif /* __ia32__ */ #endif /* __ia32__ */
#if !defined(__amd64__) && (defined(__x86_64) || defined(__x86_64__) || \ #if !defined(__amd64__) && (defined(__x86_64) || defined(__x86_64__) || \

View File

@ -43,8 +43,8 @@ bool testcase_append::run() {
uint64_t serial_count = 0; uint64_t serial_count = 0;
unsigned txn_nops = 0; unsigned txn_nops = 0;
uint64_t commited_inserted_number = inserted_number; uint64_t committed_inserted_number = inserted_number;
simple_checksum commited_inserted_checksum = inserted_checksum; simple_checksum committed_inserted_checksum = inserted_checksum;
while (should_continue()) { while (should_continue()) {
const keygen::serial_t serial = serial_count; const keygen::serial_t serial = serial_count;
if (!keyvalue_maker.increment(serial_count, 1)) { if (!keyvalue_maker.increment(serial_count, 1)) {
@ -64,8 +64,8 @@ bool testcase_append::run() {
if (err == MDBX_MAP_FULL && config.params.ignore_dbfull) { if (err == MDBX_MAP_FULL && config.params.ignore_dbfull) {
log_notice("append: bailout-insert due '%s'", mdbx_strerror(err)); log_notice("append: bailout-insert due '%s'", mdbx_strerror(err));
txn_end(true); txn_end(true);
inserted_number = commited_inserted_number; inserted_number = committed_inserted_number;
inserted_checksum = commited_inserted_checksum; inserted_checksum = committed_inserted_checksum;
break; break;
} }
@ -89,12 +89,12 @@ bool testcase_append::run() {
err = breakable_restart(); err = breakable_restart();
if (unlikely(err != MDBX_SUCCESS)) { if (unlikely(err != MDBX_SUCCESS)) {
log_notice("append: bailout-commit due '%s'", mdbx_strerror(err)); log_notice("append: bailout-commit due '%s'", mdbx_strerror(err));
inserted_number = commited_inserted_number; inserted_number = committed_inserted_number;
inserted_checksum = commited_inserted_checksum; inserted_checksum = committed_inserted_checksum;
break; break;
} }
commited_inserted_number = inserted_number; committed_inserted_number = inserted_number;
commited_inserted_checksum = inserted_checksum; committed_inserted_checksum = inserted_checksum;
txn_nops = 0; txn_nops = 0;
} }
@ -105,8 +105,8 @@ bool testcase_append::run() {
err = breakable_commit(); err = breakable_commit();
if (unlikely(err != MDBX_SUCCESS)) { if (unlikely(err != MDBX_SUCCESS)) {
log_notice("append: bailout-commit due '%s'", mdbx_strerror(err)); log_notice("append: bailout-commit due '%s'", mdbx_strerror(err));
inserted_number = commited_inserted_number; inserted_number = committed_inserted_number;
inserted_checksum = commited_inserted_checksum; inserted_checksum = committed_inserted_checksum;
} }
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------

View File

@ -21,7 +21,7 @@ bool testcase_hill::run() {
return false; return false;
} }
speculum.clear(); speculum.clear();
speculum_commited.clear(); speculum_committed.clear();
/* LY: тест "холмиком": /* LY: тест "холмиком":
* - сначала наполняем таблицу циклическими CRUD-манипуляциями, * - сначала наполняем таблицу циклическими CRUD-манипуляциями,
@ -62,7 +62,7 @@ bool testcase_hill::run() {
: MDBX_NODUPDATA; : MDBX_NODUPDATA;
uint64_t serial_count = 0; uint64_t serial_count = 0;
uint64_t commited_serial = serial_count; uint64_t committed_serial = serial_count;
unsigned txn_nops = 0; unsigned txn_nops = 0;
bool rc = false; bool rc = false;
@ -87,8 +87,8 @@ bool testcase_hill::run() {
if (err == MDBX_MAP_FULL && config.params.ignore_dbfull) { if (err == MDBX_MAP_FULL && config.params.ignore_dbfull) {
log_notice("uphill: bailout at insert-a due '%s'", mdbx_strerror(err)); log_notice("uphill: bailout at insert-a due '%s'", mdbx_strerror(err));
txn_restart(true, false); txn_restart(true, false);
serial_count = commited_serial; serial_count = committed_serial;
speculum = speculum_commited; speculum = speculum_committed;
break; break;
} }
failure_perror("mdbx_put(insert-a.1)", err); failure_perror("mdbx_put(insert-a.1)", err);
@ -102,12 +102,12 @@ bool testcase_hill::run() {
err = breakable_restart(); err = breakable_restart();
if (unlikely(err != MDBX_SUCCESS)) { if (unlikely(err != MDBX_SUCCESS)) {
log_notice("uphill: bailout at commit due '%s'", mdbx_strerror(err)); log_notice("uphill: bailout at commit due '%s'", mdbx_strerror(err));
serial_count = commited_serial; serial_count = committed_serial;
speculum = speculum_commited; speculum = speculum_committed;
break; break;
} }
speculum_commited = speculum; speculum_committed = speculum;
commited_serial = a_serial; committed_serial = a_serial;
txn_nops = 0; txn_nops = 0;
if (!speculum_verify()) { if (!speculum_verify()) {
log_notice("uphill: bailout after insert-a, after commit"); log_notice("uphill: bailout after insert-a, after commit");
@ -123,8 +123,8 @@ bool testcase_hill::run() {
if (err == MDBX_MAP_FULL && config.params.ignore_dbfull) { if (err == MDBX_MAP_FULL && config.params.ignore_dbfull) {
log_notice("uphill: bailout at insert-b due '%s'", mdbx_strerror(err)); log_notice("uphill: bailout at insert-b due '%s'", mdbx_strerror(err));
txn_restart(true, false); txn_restart(true, false);
serial_count = commited_serial; serial_count = committed_serial;
speculum = speculum_commited; speculum = speculum_committed;
break; break;
} }
failure_perror("mdbx_put(insert-b)", err); failure_perror("mdbx_put(insert-b)", err);
@ -138,12 +138,12 @@ bool testcase_hill::run() {
err = breakable_restart(); err = breakable_restart();
if (unlikely(err != MDBX_SUCCESS)) { if (unlikely(err != MDBX_SUCCESS)) {
log_notice("uphill: bailout at commit due '%s'", mdbx_strerror(err)); log_notice("uphill: bailout at commit due '%s'", mdbx_strerror(err));
serial_count = commited_serial; serial_count = committed_serial;
speculum = speculum_commited; speculum = speculum_committed;
break; break;
} }
speculum_commited = speculum; speculum_committed = speculum;
commited_serial = a_serial; committed_serial = a_serial;
txn_nops = 0; txn_nops = 0;
if (!speculum_verify()) { if (!speculum_verify()) {
log_notice("uphill: bailout after insert-b, after commit"); log_notice("uphill: bailout after insert-b, after commit");
@ -161,8 +161,8 @@ bool testcase_hill::run() {
if (err == MDBX_MAP_FULL && config.params.ignore_dbfull) { if (err == MDBX_MAP_FULL && config.params.ignore_dbfull) {
log_notice("uphill: bailout at update-a due '%s'", mdbx_strerror(err)); log_notice("uphill: bailout at update-a due '%s'", mdbx_strerror(err));
txn_restart(true, false); txn_restart(true, false);
serial_count = commited_serial; serial_count = committed_serial;
speculum = speculum_commited; speculum = speculum_committed;
break; break;
} }
failure_perror("mdbx_replace(update-a: 1->0)", err); failure_perror("mdbx_replace(update-a: 1->0)", err);
@ -176,12 +176,12 @@ bool testcase_hill::run() {
err = breakable_restart(); err = breakable_restart();
if (unlikely(err != MDBX_SUCCESS)) { if (unlikely(err != MDBX_SUCCESS)) {
log_notice("uphill: bailout at commit due '%s'", mdbx_strerror(err)); log_notice("uphill: bailout at commit due '%s'", mdbx_strerror(err));
serial_count = commited_serial; serial_count = committed_serial;
speculum = speculum_commited; speculum = speculum_committed;
break; break;
} }
speculum_commited = speculum; speculum_committed = speculum;
commited_serial = a_serial; committed_serial = a_serial;
txn_nops = 0; txn_nops = 0;
if (!speculum_verify()) { if (!speculum_verify()) {
log_notice("uphill: bailout after update-a, after commit"); log_notice("uphill: bailout after update-a, after commit");
@ -197,8 +197,8 @@ bool testcase_hill::run() {
if (err == MDBX_MAP_FULL && config.params.ignore_dbfull) { if (err == MDBX_MAP_FULL && config.params.ignore_dbfull) {
log_notice("uphill: bailout at delete-b due '%s'", mdbx_strerror(err)); log_notice("uphill: bailout at delete-b due '%s'", mdbx_strerror(err));
txn_restart(true, false); txn_restart(true, false);
serial_count = commited_serial; serial_count = committed_serial;
speculum = speculum_commited; speculum = speculum_committed;
break; break;
} }
failure_perror("mdbx_del(b)", err); failure_perror("mdbx_del(b)", err);
@ -212,12 +212,12 @@ bool testcase_hill::run() {
err = breakable_restart(); err = breakable_restart();
if (unlikely(err != MDBX_SUCCESS)) { if (unlikely(err != MDBX_SUCCESS)) {
log_notice("uphill: bailout at commit due '%s'", mdbx_strerror(err)); log_notice("uphill: bailout at commit due '%s'", mdbx_strerror(err));
serial_count = commited_serial; serial_count = committed_serial;
speculum = speculum_commited; speculum = speculum_committed;
break; break;
} }
speculum_commited = speculum; speculum_committed = speculum;
commited_serial = a_serial; committed_serial = a_serial;
txn_nops = 0; txn_nops = 0;
if (!speculum_verify()) { if (!speculum_verify()) {
log_notice("uphill: bailout after delete-b, after commit"); log_notice("uphill: bailout after delete-b, after commit");
@ -296,7 +296,7 @@ bool testcase_hill::run() {
log_notice("downhill: bailout at update-a due '%s'", log_notice("downhill: bailout at update-a due '%s'",
mdbx_strerror(err)); mdbx_strerror(err));
txn_end(true); txn_end(true);
speculum = speculum_commited; speculum = speculum_committed;
break; break;
} }
failure_perror("mdbx_put(update-a: 0->1)", err); failure_perror("mdbx_put(update-a: 0->1)", err);
@ -310,10 +310,10 @@ bool testcase_hill::run() {
err = breakable_restart(); err = breakable_restart();
if (unlikely(err != MDBX_SUCCESS)) { if (unlikely(err != MDBX_SUCCESS)) {
log_notice("downhill: bailout at commit due '%s'", mdbx_strerror(err)); log_notice("downhill: bailout at commit due '%s'", mdbx_strerror(err));
speculum = speculum_commited; speculum = speculum_committed;
break; break;
} }
speculum_commited = speculum; speculum_committed = speculum;
txn_nops = 0; txn_nops = 0;
if (!speculum_verify()) { if (!speculum_verify()) {
log_notice("downhill: bailout after update-a, after commit"); log_notice("downhill: bailout after update-a, after commit");
@ -330,7 +330,7 @@ bool testcase_hill::run() {
log_notice("downhill: bailout at insert-a due '%s'", log_notice("downhill: bailout at insert-a due '%s'",
mdbx_strerror(err)); mdbx_strerror(err));
txn_end(true); txn_end(true);
speculum = speculum_commited; speculum = speculum_committed;
break; break;
} }
failure_perror("mdbx_put(insert-b)", err); failure_perror("mdbx_put(insert-b)", err);
@ -344,10 +344,10 @@ bool testcase_hill::run() {
err = breakable_restart(); err = breakable_restart();
if (unlikely(err != MDBX_SUCCESS)) { if (unlikely(err != MDBX_SUCCESS)) {
log_notice("downhill: bailout at commit due '%s'", mdbx_strerror(err)); log_notice("downhill: bailout at commit due '%s'", mdbx_strerror(err));
speculum = speculum_commited; speculum = speculum_committed;
break; break;
} }
speculum_commited = speculum; speculum_committed = speculum;
txn_nops = 0; txn_nops = 0;
if (!speculum_verify()) { if (!speculum_verify()) {
log_notice("downhill: bailout after insert-b, after commit"); log_notice("downhill: bailout after insert-b, after commit");
@ -365,7 +365,7 @@ bool testcase_hill::run() {
log_notice("downhill: bailout at delete-a due '%s'", log_notice("downhill: bailout at delete-a due '%s'",
mdbx_strerror(err)); mdbx_strerror(err));
txn_end(true); txn_end(true);
speculum = speculum_commited; speculum = speculum_committed;
break; break;
} }
failure_perror("mdbx_del(a)", err); failure_perror("mdbx_del(a)", err);
@ -379,10 +379,10 @@ bool testcase_hill::run() {
err = breakable_restart(); err = breakable_restart();
if (unlikely(err != MDBX_SUCCESS)) { if (unlikely(err != MDBX_SUCCESS)) {
log_notice("downhill: bailout at commit due '%s'", mdbx_strerror(err)); log_notice("downhill: bailout at commit due '%s'", mdbx_strerror(err));
speculum = speculum_commited; speculum = speculum_committed;
break; break;
} }
speculum_commited = speculum; speculum_committed = speculum;
txn_nops = 0; txn_nops = 0;
if (!speculum_verify()) { if (!speculum_verify()) {
log_notice("downhill: bailout after delete-a, after commit"); log_notice("downhill: bailout after delete-a, after commit");
@ -399,7 +399,7 @@ bool testcase_hill::run() {
log_notice("downhill: bailout at delete-b due '%s'", log_notice("downhill: bailout at delete-b due '%s'",
mdbx_strerror(err)); mdbx_strerror(err));
txn_end(true); txn_end(true);
speculum = speculum_commited; speculum = speculum_committed;
break; break;
} }
failure_perror("mdbx_del(b)", err); failure_perror("mdbx_del(b)", err);
@ -413,10 +413,10 @@ bool testcase_hill::run() {
err = breakable_restart(); err = breakable_restart();
if (unlikely(err != MDBX_SUCCESS)) { if (unlikely(err != MDBX_SUCCESS)) {
log_notice("downhill: bailout at commit due '%s'", mdbx_strerror(err)); log_notice("downhill: bailout at commit due '%s'", mdbx_strerror(err));
speculum = speculum_commited; speculum = speculum_committed;
break; break;
} }
speculum_commited = speculum; speculum_committed = speculum;
txn_nops = 0; txn_nops = 0;
if (!speculum_verify()) { if (!speculum_verify()) {
log_notice("downhill: bailout after delete-b, after commit"); log_notice("downhill: bailout after delete-b, after commit");

View File

@ -92,7 +92,7 @@ bool testcase_nested::pop_txn(bool abort) {
assert(txn_guard && !stack.empty()); assert(txn_guard && !stack.empty());
bool should_continue = true; bool should_continue = true;
MDBX_txn *txn = txn_guard.release(); MDBX_txn *txn = txn_guard.release();
bool commited = false; bool committed = false;
if (abort) { if (abort) {
log_verbose( log_verbose(
"abort level#%zu txn #%" PRIu64 ", undo serial %" PRIu64 " <- %" PRIu64, "abort level#%zu txn #%" PRIu64 ", undo serial %" PRIu64 " <- %" PRIu64,
@ -105,7 +105,7 @@ bool testcase_nested::pop_txn(bool abort) {
stack.size(), serial, std::get<1>(stack.top())); stack.size(), serial, std::get<1>(stack.top()));
int err = mdbx_txn_commit(txn); int err = mdbx_txn_commit(txn);
if (likely(err == MDBX_SUCCESS)) if (likely(err == MDBX_SUCCESS))
commited = true; committed = true;
else { else {
should_continue = false; should_continue = false;
if (err == MDBX_MAP_FULL && config.params.ignore_dbfull) { if (err == MDBX_MAP_FULL && config.params.ignore_dbfull) {
@ -119,7 +119,7 @@ bool testcase_nested::pop_txn(bool abort) {
} }
std::swap(txn_guard, std::get<0>(stack.top())); std::swap(txn_guard, std::get<0>(stack.top()));
if (!commited) { if (!committed) {
serial = std::get<1>(stack.top()); serial = std::get<1>(stack.top());
std::swap(fifo, std::get<2>(stack.top())); std::swap(fifo, std::get<2>(stack.top()));
std::swap(speculum, std::get<3>(stack.top())); std::swap(speculum, std::get<3>(stack.top()));

View File

@ -164,7 +164,7 @@ void osal_setup(const std::vector<actor_config> &actors) {
, ,
-1, 0); -1, 0);
if (MAP_FAILED == (void *)shared) if (MAP_FAILED == (void *)shared)
failure_perror("mmap(shared_conds)", errno); failure_perror("mmap(shared)", errno);
shared->count = actors.size() + 1; shared->count = actors.size() + 1;

View File

@ -207,9 +207,9 @@ int testcase::breakable_commit() {
if (need_speculum_assign) { if (need_speculum_assign) {
need_speculum_assign = false; need_speculum_assign = false;
if (unlikely(rc != MDBX_SUCCESS)) if (unlikely(rc != MDBX_SUCCESS))
speculum = speculum_commited; speculum = speculum_committed;
else else
speculum_commited = speculum; speculum_committed = speculum;
} }
log_trace("<< txn_commit: %s", rc ? "failed" : "Ok"); log_trace("<< txn_commit: %s", rc ? "failed" : "Ok");
@ -240,14 +240,14 @@ void testcase::txn_end(bool abort) {
if (unlikely(err != MDBX_SUCCESS)) if (unlikely(err != MDBX_SUCCESS))
failure_perror("mdbx_txn_abort()", err); failure_perror("mdbx_txn_abort()", err);
if (need_speculum_assign) if (need_speculum_assign)
speculum = speculum_commited; speculum = speculum_committed;
} else { } else {
txn_inject_writefault(txn); txn_inject_writefault(txn);
int err = mdbx_txn_commit(txn); int err = mdbx_txn_commit(txn);
if (unlikely(err != MDBX_SUCCESS)) if (unlikely(err != MDBX_SUCCESS))
failure_perror("mdbx_txn_commit()", err); failure_perror("mdbx_txn_commit()", err);
if (need_speculum_assign) if (need_speculum_assign)
speculum_commited = speculum; speculum_committed = speculum;
} }
log_trace("<< txn_end(%s)", abort ? "abort" : "commit"); log_trace("<< txn_end(%s)", abort ? "abort" : "commit");
@ -615,13 +615,13 @@ bool test_execute(const actor_config &config_const) {
} }
if (config.params.nrepeat == 1) if (config.params.nrepeat == 1)
log_verbose("test successed"); log_verbose("test successfully");
else { else {
if (config.params.nrepeat) if (config.params.nrepeat)
log_verbose("test successed (iteration %zi of %zi)", iter, log_verbose("test successfully (iteration %zi of %zi)", iter,
size_t(config.params.nrepeat)); size_t(config.params.nrepeat));
else else
log_verbose("test successed (iteration %zi)", iter); log_verbose("test successfully (iteration %zi)", iter);
config.params.keygen.seed += INT32_C(0xA4F4D37B); config.params.keygen.seed += INT32_C(0xA4F4D37B);
} }

View File

@ -158,7 +158,7 @@ protected:
MDBX_canary canary; MDBX_canary canary;
} last; } last;
SET speculum{ItemCompare(this)}, speculum_commited{ItemCompare(this)}; SET speculum{ItemCompare(this)}, speculum_committed{ItemCompare(this)};
bool speculum_verify(); bool speculum_verify();
int insert(const keygen::buffer &akey, const keygen::buffer &adata, int insert(const keygen::buffer &akey, const keygen::buffer &adata,
MDBX_put_flags_t flags); MDBX_put_flags_t flags);