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

View File

@ -87,7 +87,7 @@ ifeq ($(wildcard mdbx.c),mdbx.c)
#< dist-cutoff-end
################################################################################
# Amalgamated source code, i.e. distributed after `make dists`
# Amalgamated source code, i.e. distributed after `make dist`
MAN_SRCDIR := man1/
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(VERSION 3.8.2)
macro(add_compile_flags langs)
foreach(_lang ${langs})
macro(add_compile_flags languages)
foreach(_lang ${languages})
string(REPLACE ";" " " _flags "${ARGN}")
if(CMAKE_CXX_COMPILER_LOADED AND _lang STREQUAL "CXX")
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
* high likely lead to database corruption.
* - 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
* 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
@ -1954,7 +1954,7 @@ struct MDBX_stat {
uint64_t ms_leaf_pages; /**< Number of leaf pages */
uint64_t ms_overflow_pages; /**< Number of overflow pages */
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
/** \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] tid A thread_id of the reader thread.
* \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
* this reader finished. The callback function can take
* 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).
inline void close_map(const map_handle &);
/// \brief Readed information
/// \brief Reader information
struct reader_info {
int slot; ///< The reader lock table slot number.
mdbx_pid_t pid; ///< The reader process ID.

View File

@ -38,7 +38,7 @@
#include "internals.h"
/*------------------------------------------------------------------------------
* Internal inlines */
* Internal inline functions */
MDBX_NOTHROW_CONST_FUNCTION static unsigned log2n(size_t 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) \
((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. */
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];
k2.iov_base = node_key(node);
k2.iov_len = node_ks(node);
mdbx_debug("update key %u (ofs %u) [%s] to [%s] on page %" PRIaPGNO, indx,
ptr, mdbx_dump_val(&k2, kbuf2, sizeof(kbuf2)), DKEY(key),
mdbx_debug("update key %u (offset %u) [%s] to [%s] on page %" PRIaPGNO,
indx, ptr, mdbx_dump_val(&k2, kbuf2, sizeof(kbuf2)), DKEY(key),
mp->mp_pgno);
}

View File

@ -287,7 +287,7 @@ typedef struct MDBX_db {
pgno_t md_overflow_pages; /* number of overflow pages */
uint64_t md_seq; /* table sequence counter */
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;
/* database size-related parameters */
@ -943,7 +943,7 @@ struct MDBX_env {
#define me_lfd me_lck_mmap.fd
#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 */
int8_t me_stuck_meta; /* recovery-only: target meta page or less that zero */
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) {
fprintf(stderr,
"present sequence for '%s' value (%" PRIu64
") is greated than loaded (%" PRIu64 ")\n",
") is greater than loaded (%" PRIu64 ")\n",
dbi_name, present_sequence, sequence);
rc = MDBX_RESULT_TRUE;
goto txn_abort;

View File

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

View File

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

View File

@ -21,7 +21,7 @@ bool testcase_hill::run() {
return false;
}
speculum.clear();
speculum_commited.clear();
speculum_committed.clear();
/* LY: тест "холмиком":
* - сначала наполняем таблицу циклическими CRUD-манипуляциями,
@ -62,7 +62,7 @@ bool testcase_hill::run() {
: MDBX_NODUPDATA;
uint64_t serial_count = 0;
uint64_t commited_serial = serial_count;
uint64_t committed_serial = serial_count;
unsigned txn_nops = 0;
bool rc = false;
@ -87,8 +87,8 @@ bool testcase_hill::run() {
if (err == MDBX_MAP_FULL && config.params.ignore_dbfull) {
log_notice("uphill: bailout at insert-a due '%s'", mdbx_strerror(err));
txn_restart(true, false);
serial_count = commited_serial;
speculum = speculum_commited;
serial_count = committed_serial;
speculum = speculum_committed;
break;
}
failure_perror("mdbx_put(insert-a.1)", err);
@ -102,12 +102,12 @@ bool testcase_hill::run() {
err = breakable_restart();
if (unlikely(err != MDBX_SUCCESS)) {
log_notice("uphill: bailout at commit due '%s'", mdbx_strerror(err));
serial_count = commited_serial;
speculum = speculum_commited;
serial_count = committed_serial;
speculum = speculum_committed;
break;
}
speculum_commited = speculum;
commited_serial = a_serial;
speculum_committed = speculum;
committed_serial = a_serial;
txn_nops = 0;
if (!speculum_verify()) {
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) {
log_notice("uphill: bailout at insert-b due '%s'", mdbx_strerror(err));
txn_restart(true, false);
serial_count = commited_serial;
speculum = speculum_commited;
serial_count = committed_serial;
speculum = speculum_committed;
break;
}
failure_perror("mdbx_put(insert-b)", err);
@ -138,12 +138,12 @@ bool testcase_hill::run() {
err = breakable_restart();
if (unlikely(err != MDBX_SUCCESS)) {
log_notice("uphill: bailout at commit due '%s'", mdbx_strerror(err));
serial_count = commited_serial;
speculum = speculum_commited;
serial_count = committed_serial;
speculum = speculum_committed;
break;
}
speculum_commited = speculum;
commited_serial = a_serial;
speculum_committed = speculum;
committed_serial = a_serial;
txn_nops = 0;
if (!speculum_verify()) {
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) {
log_notice("uphill: bailout at update-a due '%s'", mdbx_strerror(err));
txn_restart(true, false);
serial_count = commited_serial;
speculum = speculum_commited;
serial_count = committed_serial;
speculum = speculum_committed;
break;
}
failure_perror("mdbx_replace(update-a: 1->0)", err);
@ -176,12 +176,12 @@ bool testcase_hill::run() {
err = breakable_restart();
if (unlikely(err != MDBX_SUCCESS)) {
log_notice("uphill: bailout at commit due '%s'", mdbx_strerror(err));
serial_count = commited_serial;
speculum = speculum_commited;
serial_count = committed_serial;
speculum = speculum_committed;
break;
}
speculum_commited = speculum;
commited_serial = a_serial;
speculum_committed = speculum;
committed_serial = a_serial;
txn_nops = 0;
if (!speculum_verify()) {
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) {
log_notice("uphill: bailout at delete-b due '%s'", mdbx_strerror(err));
txn_restart(true, false);
serial_count = commited_serial;
speculum = speculum_commited;
serial_count = committed_serial;
speculum = speculum_committed;
break;
}
failure_perror("mdbx_del(b)", err);
@ -212,12 +212,12 @@ bool testcase_hill::run() {
err = breakable_restart();
if (unlikely(err != MDBX_SUCCESS)) {
log_notice("uphill: bailout at commit due '%s'", mdbx_strerror(err));
serial_count = commited_serial;
speculum = speculum_commited;
serial_count = committed_serial;
speculum = speculum_committed;
break;
}
speculum_commited = speculum;
commited_serial = a_serial;
speculum_committed = speculum;
committed_serial = a_serial;
txn_nops = 0;
if (!speculum_verify()) {
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'",
mdbx_strerror(err));
txn_end(true);
speculum = speculum_commited;
speculum = speculum_committed;
break;
}
failure_perror("mdbx_put(update-a: 0->1)", err);
@ -310,10 +310,10 @@ bool testcase_hill::run() {
err = breakable_restart();
if (unlikely(err != MDBX_SUCCESS)) {
log_notice("downhill: bailout at commit due '%s'", mdbx_strerror(err));
speculum = speculum_commited;
speculum = speculum_committed;
break;
}
speculum_commited = speculum;
speculum_committed = speculum;
txn_nops = 0;
if (!speculum_verify()) {
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'",
mdbx_strerror(err));
txn_end(true);
speculum = speculum_commited;
speculum = speculum_committed;
break;
}
failure_perror("mdbx_put(insert-b)", err);
@ -344,10 +344,10 @@ bool testcase_hill::run() {
err = breakable_restart();
if (unlikely(err != MDBX_SUCCESS)) {
log_notice("downhill: bailout at commit due '%s'", mdbx_strerror(err));
speculum = speculum_commited;
speculum = speculum_committed;
break;
}
speculum_commited = speculum;
speculum_committed = speculum;
txn_nops = 0;
if (!speculum_verify()) {
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'",
mdbx_strerror(err));
txn_end(true);
speculum = speculum_commited;
speculum = speculum_committed;
break;
}
failure_perror("mdbx_del(a)", err);
@ -379,10 +379,10 @@ bool testcase_hill::run() {
err = breakable_restart();
if (unlikely(err != MDBX_SUCCESS)) {
log_notice("downhill: bailout at commit due '%s'", mdbx_strerror(err));
speculum = speculum_commited;
speculum = speculum_committed;
break;
}
speculum_commited = speculum;
speculum_committed = speculum;
txn_nops = 0;
if (!speculum_verify()) {
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'",
mdbx_strerror(err));
txn_end(true);
speculum = speculum_commited;
speculum = speculum_committed;
break;
}
failure_perror("mdbx_del(b)", err);
@ -413,10 +413,10 @@ bool testcase_hill::run() {
err = breakable_restart();
if (unlikely(err != MDBX_SUCCESS)) {
log_notice("downhill: bailout at commit due '%s'", mdbx_strerror(err));
speculum = speculum_commited;
speculum = speculum_committed;
break;
}
speculum_commited = speculum;
speculum_committed = speculum;
txn_nops = 0;
if (!speculum_verify()) {
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());
bool should_continue = true;
MDBX_txn *txn = txn_guard.release();
bool commited = false;
bool committed = false;
if (abort) {
log_verbose(
"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()));
int err = mdbx_txn_commit(txn);
if (likely(err == MDBX_SUCCESS))
commited = true;
committed = true;
else {
should_continue = false;
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()));
if (!commited) {
if (!committed) {
serial = std::get<1>(stack.top());
std::swap(fifo, std::get<2>(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);
if (MAP_FAILED == (void *)shared)
failure_perror("mmap(shared_conds)", errno);
failure_perror("mmap(shared)", errno);
shared->count = actors.size() + 1;

View File

@ -207,9 +207,9 @@ int testcase::breakable_commit() {
if (need_speculum_assign) {
need_speculum_assign = false;
if (unlikely(rc != MDBX_SUCCESS))
speculum = speculum_commited;
speculum = speculum_committed;
else
speculum_commited = speculum;
speculum_committed = speculum;
}
log_trace("<< txn_commit: %s", rc ? "failed" : "Ok");
@ -240,14 +240,14 @@ void testcase::txn_end(bool abort) {
if (unlikely(err != MDBX_SUCCESS))
failure_perror("mdbx_txn_abort()", err);
if (need_speculum_assign)
speculum = speculum_commited;
speculum = speculum_committed;
} else {
txn_inject_writefault(txn);
int err = mdbx_txn_commit(txn);
if (unlikely(err != MDBX_SUCCESS))
failure_perror("mdbx_txn_commit()", err);
if (need_speculum_assign)
speculum_commited = speculum;
speculum_committed = speculum;
}
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)
log_verbose("test successed");
log_verbose("test successfully");
else {
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));
else
log_verbose("test successed (iteration %zi)", iter);
log_verbose("test successfully (iteration %zi)", iter);
config.params.keygen.seed += INT32_C(0xA4F4D37B);
}

View File

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