mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-02 04:24:12 +08:00
mdbx: fix English typos (backport).
Thanks to Dimitris Apostolou <dimitris.apostolou@icloud.com>
This commit is contained in:
parent
24df8073ac
commit
60736dbabb
@ -837,7 +837,7 @@ Fixes:
|
||||
- Fix a lot of typos & spelling (Thanks to Josh Soref for PR).
|
||||
- Fix `getopt()` messages for Windows (Thanks to Andrey Sporaw for reporting).
|
||||
- Fix MSVC compiler version requirements (Thanks to Andrey Sporaw for reporting).
|
||||
- Workarounds for QEMU's bugs to run tests for cross-builded library under QEMU.
|
||||
- Workarounds for QEMU's bugs to run tests for cross-built[A library under QEMU.
|
||||
- Now C++ compiler optional for building by CMake.
|
||||
|
||||
|
||||
@ -906,7 +906,7 @@ Deprecated functions and flags:
|
||||
- Avoid using `pwritev()` for single-writes (up to 10% speedup for some kernels & scenarios).
|
||||
- Avoiding `MDBX_UTTERLY_NOSYNC` as result of flags merge.
|
||||
- Add `mdbx_dbi_dupsort_depthmask()` function.
|
||||
- Add `MDBX_CP_FORCE_RESIZEABLE` option.
|
||||
- Add `MDBX_CP_FORCE_RESIZABLE` option.
|
||||
- Add deprecated `MDBX_MAP_RESIZED` for compatibility.
|
||||
- Add `MDBX_BUILD_TOOLS` option (default `ON`).
|
||||
- Refine `mdbx_dbi_open_ex()` to safe concurrently opening the same handle from different threads.
|
||||
|
@ -6,7 +6,7 @@
|
||||
#
|
||||
################################################################################
|
||||
#
|
||||
# Basic internal definitios. For a customizable variables and options see below.
|
||||
# Basic internal definitions. For a customizable variables and options see below.
|
||||
#
|
||||
$(info // The GNU Make $(MAKE_VERSION))
|
||||
SHELL := $(shell env bash -c 'echo $$BASH')
|
||||
|
16
mdbx.h
16
mdbx.h
@ -695,11 +695,11 @@ extern LIBMDBX_VERINFO_API const struct MDBX_build_info {
|
||||
* automatically (de)initialization, releasing reader lock table slots
|
||||
* and so on.
|
||||
*
|
||||
* If MDBX builded as a DLL this is done out-of-the-box by DllEntry() function,
|
||||
* If MDBX built as a DLL this is done out-of-the-box by DllEntry() function,
|
||||
* which called automatically by Windows core with passing corresponding reason
|
||||
* argument.
|
||||
*
|
||||
* Otherwise, if MDBX was builded not as a DLL, some black magic
|
||||
* Otherwise, if MDBX was built not as a DLL, some black magic
|
||||
* may be required depending of Windows version:
|
||||
*
|
||||
* - Modern Windows versions, including Windows Vista and later, provides
|
||||
@ -851,7 +851,7 @@ enum MDBX_constants {
|
||||
/* DEBUG & LOGGING ************************************************************/
|
||||
|
||||
/** \addtogroup c_debug
|
||||
* \note Most of debug feature enabled only when libmdbx builded with
|
||||
* \note Most of debug feature enabled only when libmdbx built with
|
||||
* \ref MDBX_DEBUG build option. @{ */
|
||||
|
||||
/** Log level
|
||||
@ -916,7 +916,7 @@ typedef enum MDBX_log_level_t MDBX_log_level_t;
|
||||
*
|
||||
* \details `MDBX_DBG_DUMP` and `MDBX_DBG_LEGACY_MULTIOPEN` always have an
|
||||
* effect, but `MDBX_DBG_ASSERT`, `MDBX_DBG_AUDIT` and `MDBX_DBG_JITTER` only if
|
||||
* libmdbx builded with \ref MDBX_DEBUG. */
|
||||
* libmdbx built with \ref MDBX_DEBUG. */
|
||||
enum MDBX_debug_flags_t {
|
||||
MDBX_DBG_NONE = 0,
|
||||
|
||||
@ -1642,7 +1642,7 @@ enum MDBX_copy_flags_t {
|
||||
* pages sequentially */
|
||||
MDBX_CP_COMPACT = 1u,
|
||||
|
||||
/** Force to make resizeable copy, i.e. dynamic size instead of fixed */
|
||||
/** Force to make resizable copy, i.e. dynamic size instead of fixed */
|
||||
MDBX_CP_FORCE_DYNAMIC_SIZE = 2u
|
||||
};
|
||||
#ifndef __cplusplus
|
||||
@ -2358,7 +2358,7 @@ LIBMDBX_API int mdbx_env_delete(const char *pathname,
|
||||
* account skipping free pages.
|
||||
*
|
||||
* - \ref MDBX_CP_FORCE_DYNAMIC_SIZE
|
||||
* Force to make resizeable copy, i.e. dynamic size instead of fixed.
|
||||
* Force to make resizable copy, i.e. dynamic size instead of fixed.
|
||||
*
|
||||
* \returns A non-zero error value on failure and 0 on success. */
|
||||
LIBMDBX_API int mdbx_env_copy(MDBX_env *env, const char *dest,
|
||||
@ -2876,7 +2876,7 @@ LIBMDBX_API int mdbx_env_get_fd(const MDBX_env *env, mdbx_filehandle_t *fd);
|
||||
* was called after \ref mdbx_env_open() but OUTSIDE a write transaction,
|
||||
* then MDBX will execute internal pseudo-transaction to apply new parameters
|
||||
* (but only if anything has been changed), and changes be visible to any
|
||||
* others processes immediately after succesful completion of function.
|
||||
* others processes immediately after successful completion of function.
|
||||
*
|
||||
* Essentially a concept of "automatic size management" is simple and useful:
|
||||
* - There are the lower and upper bounds of the database file size;
|
||||
@ -4956,7 +4956,7 @@ mdbx_get_datacmp(MDBX_db_flags_t flags);
|
||||
* \param [in] thread The reader thread ID.
|
||||
* \param [in] bytes_used The number of last used page
|
||||
* in the MVCC-snapshot which being read,
|
||||
* i.e. database file can't shrinked beyond this.
|
||||
* i.e. database file can't be shrunk beyond this.
|
||||
* \param [in] bytes_retained The total size of the database pages that were
|
||||
* retired by committed write transactions after
|
||||
* the reader's MVCC-snapshot,
|
||||
|
2
mdbx.h++
2
mdbx.h++
@ -3428,7 +3428,7 @@ public:
|
||||
/// transactions since the current read
|
||||
/// transaction started.
|
||||
size_t bytes_used; ///< The number of last used page in the MVCC-snapshot
|
||||
///< which being read, i.e. database file can't shrinked
|
||||
///< which being read, i.e. database file can't be shrunk
|
||||
///< beyond this.
|
||||
size_t bytes_retained; ///< The total size of the database pages that
|
||||
///< were retired by committed write transactions
|
||||
|
18
src/core.c
18
src/core.c
@ -397,7 +397,7 @@ node_largedata_pgno(const MDBX_node *const __restrict node) {
|
||||
*
|
||||
* BRANCH_NODE_MAX
|
||||
* Branch-page must contain at least two nodes, within each a key and a child
|
||||
* page number. But page can't be splitted if it contains less that 4 keys,
|
||||
* page number. But page can't be split if it contains less that 4 keys,
|
||||
* i.e. a page should not overflow before adding the fourth key. Therefore,
|
||||
* at least 3 branch-node should fit in the single branch-page. Further, the
|
||||
* first node of a branch-page doesn't contain a key, i.e. the first node
|
||||
@ -411,8 +411,8 @@ node_largedata_pgno(const MDBX_node *const __restrict node) {
|
||||
* Leaf-node must fit into single leaf-page, where a value could be placed on
|
||||
* a large/overflow page. However, may require to insert a nearly page-sized
|
||||
* node between two large nodes are already fill-up a page. In this case the
|
||||
* page must be splitted to two if some pair of nodes fits on one page, or
|
||||
* otherwise the page should be splitted to the THREE with a single node
|
||||
* page must be split to two if some pair of nodes fits on one page, or
|
||||
* otherwise the page should be split to the THREE with a single node
|
||||
* per each of ones. Such 1-into-3 page splitting is costly and complex since
|
||||
* requires TWO insertion into the parent page, that could lead to split it
|
||||
* and so on up to the root. Therefore double-splitting is avoided here and
|
||||
@ -1087,7 +1087,7 @@ static __always_inline bool safe64_reset_compare(MDBX_atomic_uint64_t *p,
|
||||
* the asynchronously cancellation of read transaction. Therefore,
|
||||
* there may be a collision between the cleanup performed here and
|
||||
* asynchronous termination and restarting of the read transaction
|
||||
* in another proces/thread. In general we MUST NOT reset the `mr_txnid`
|
||||
* in another process/thread. In general we MUST NOT reset the `mr_txnid`
|
||||
* if a new transaction was started (i.e. if `mr_txnid` was changed). */
|
||||
#if MDBX_64BIT_CAS
|
||||
bool rc = atomic_cas64(p, compare, UINT64_MAX);
|
||||
@ -19465,8 +19465,8 @@ __cold static void compact_fixup_meta(MDBX_env *env, MDBX_meta *meta) {
|
||||
unaligned_poke_u64(4, meta->mm_datasync_sign, meta_sign(meta));
|
||||
}
|
||||
|
||||
/* Make resizeable */
|
||||
__cold static void make_sizeable(MDBX_meta *meta) {
|
||||
/* Make resizable */
|
||||
__cold static void make_resizable(MDBX_meta *meta) {
|
||||
meta->mm_geo.lower = MIN_PAGENO;
|
||||
if (meta->mm_geo.grow_pv == 0) {
|
||||
const pgno_t step = 1 + (meta->mm_geo.upper - meta->mm_geo.lower) / 42;
|
||||
@ -19489,7 +19489,7 @@ __cold static int mdbx_env_compact(MDBX_env *env, MDBX_txn *read_txn,
|
||||
meta_set_txnid(env, meta, read_txn->mt_txnid);
|
||||
|
||||
if (flags & MDBX_CP_FORCE_DYNAMIC_SIZE)
|
||||
make_sizeable(meta);
|
||||
make_resizable(meta);
|
||||
|
||||
/* copy canary sequences if present */
|
||||
if (read_txn->mt_canary.v) {
|
||||
@ -19652,7 +19652,7 @@ __cold static int mdbx_env_copy_asis(MDBX_env *env, MDBX_txn *read_txn,
|
||||
mdbx_txn_unlock(env);
|
||||
|
||||
if (flags & MDBX_CP_FORCE_DYNAMIC_SIZE)
|
||||
make_sizeable(headcopy);
|
||||
make_resizable(headcopy);
|
||||
/* Update signature to steady */
|
||||
unaligned_poke_u64(4, headcopy->mm_datasync_sign, meta_sign(headcopy));
|
||||
|
||||
@ -19708,7 +19708,7 @@ __cold static int mdbx_env_copy_asis(MDBX_env *env, MDBX_txn *read_txn,
|
||||
break;
|
||||
rc = errno;
|
||||
if (rc == EXDEV || rc == /* workaround for ecryptfs bug(s),
|
||||
maybe usefull for others fs */
|
||||
maybe useful for others FS */
|
||||
EINVAL)
|
||||
not_the_same_filesystem = true;
|
||||
else if (ignore_enosys(rc) == MDBX_RESULT_TRUE)
|
||||
|
@ -35,7 +35,7 @@
|
||||
|
||||
/** Disables using GNU/Linux libc extensions.
|
||||
* \ingroup build_option
|
||||
* \note This option couldn't be moved to the options.h since dependant
|
||||
* \note This option couldn't be moved to the options.h since dependent
|
||||
* control macros/defined should be prepared before include the options.h */
|
||||
#ifndef MDBX_DISABLE_GNU_SOURCE
|
||||
#define MDBX_DISABLE_GNU_SOURCE 0
|
||||
|
@ -1370,7 +1370,7 @@ int main(int argc, char *argv[]) {
|
||||
alloc_pages = backed_pages;
|
||||
}
|
||||
} else {
|
||||
/* LY: DB may be shrinked by writer down to the allocated pages. */
|
||||
/* LY: DB may be shrunk by writer down to the allocated pages. */
|
||||
if (alloc_pages > backed_pages) {
|
||||
print(" ! alloc-pages %" PRIu64 " > backed-pages %" PRIu64 "\n",
|
||||
alloc_pages, backed_pages);
|
||||
|
@ -129,7 +129,7 @@
|
||||
|
||||
/** Controls sort order of internal page number lists.
|
||||
* This mostly experimental/advanced option with not for regular MDBX users.
|
||||
* \warning The database format depend on this option and libmdbx builded with
|
||||
* \warning The database format depend on this option and libmdbx built with
|
||||
* different option value are incompatible. */
|
||||
#ifndef MDBX_PNL_ASCENDING
|
||||
#define MDBX_PNL_ASCENDING 0
|
||||
|
@ -539,7 +539,7 @@ MDBX_INTERNAL_FUNC int mdbx_lck_destroy(MDBX_env *env,
|
||||
MDBX_INTERNAL_FUNC int mdbx_lck_seize(MDBX_env *env);
|
||||
|
||||
/// \brief Downgrades the level of initially acquired lock to
|
||||
/// operational level specified by argument. The reson for such downgrade:
|
||||
/// operational level specified by argument. The reason for such downgrade:
|
||||
/// - unblocking of other processes that are waiting for access, i.e.
|
||||
/// if (env->me_flags & MDBX_EXCLUSIVE) != 0, then other processes
|
||||
/// should be made aware that access is unavailable rather than
|
||||
|
Loading…
x
Reference in New Issue
Block a user