mdbx: rename MDBX_NOSYNC to MDBX_SAFE_NOSYNC for clarity.

Change-Id: I1d04600832cb7c86c578d72f3d6163ee22d134b7
This commit is contained in:
Leonid Yuriev
2019-12-15 15:13:46 +03:00
parent a77921dc67
commit 4eccf901ea
7 changed files with 104 additions and 96 deletions

View File

@@ -296,9 +296,9 @@ bool parse_option(int argc, char *const argv[], int &narg, const char *option,
const struct option_verb mode_bits[] = {{"rdonly", MDBX_RDONLY},
{"mapasync", MDBX_MAPASYNC},
{"utterly", MDBX_UTTERLY_NOSYNC},
{"nosync-utterly", MDBX_UTTERLY_NOSYNC},
{"nosubdir", MDBX_NOSUBDIR},
{"nosync", MDBX_NOSYNC},
{"nosync-safe", MDBX_SAFE_NOSYNC},
{"nometasync", MDBX_NOMETASYNC},
{"writemap", MDBX_WRITEMAP},
{"notls", MDBX_NOTLS},

View File

@@ -87,19 +87,19 @@ void __noreturn usage(void) {
" --keygen.case=random Generator case (only `random` for now)\n"
"Database operation mode:\n"
" --mode={[+-]FLAG}[,[+-]FLAG]...\n"
" nosubdir == MDBX_NOSUBDIR\n"
" rdonly == MDBX_RDONLY\n"
" nometasync == MDBX_NOMETASYNC\n"
" lifo == MDBX_LIFORECLAIM\n"
" coalesce == MDBX_COALESCE\n"
" nosync == MDBX_NOSYNC\n"
" writemap == MDBX_WRITEMAP\n"
" mapasync == MDBX_MAPASYNC\n"
" utterly == MDBX_UTTERLY_NOSYNC\n"
" perturb == MDBX_PAGEPERTURB\n"
" notls == MDBX_NOTLS\n"
" nordahead == MDBX_NORDAHEAD\n"
" nomeminit == MDBX_NOMEMINIT\n"
" nosubdir == MDBX_NOSUBDIR\n"
" rdonly == MDBX_RDONLY\n"
" nometasync == MDBX_NOMETASYNC\n"
" lifo == MDBX_LIFORECLAIM\n"
" coalesce == MDBX_COALESCE\n"
" nosync-safe == MDBX_SAFE_NOSYNC\n"
" writemap == MDBX_WRITEMAP\n"
" mapasync == MDBX_MAPASYNC\n"
" nosync-utterly == MDBX_UTTERLY_NOSYNC\n"
" perturb == MDBX_PAGEPERTURB\n"
" notls == MDBX_NOTLS\n"
" nordahead == MDBX_NORDAHEAD\n"
" nomeminit == MDBX_NOMEMINIT\n"
"Key-value space/table options:\n"
" --table={[+-]FLAG}[,[+-]FLAG]...\n"
" key.reverse == MDBX_REVERSEKEY\n"

View File

@@ -70,7 +70,8 @@ static unsigned edge2count(uint64_t edge, unsigned count_max) {
void testcase_nested::push_txn() {
MDBX_txn *txn;
unsigned flags = prng32() & (MDBX_NOSYNC | MDBX_NOMETASYNC | MDBX_MAPASYNC);
unsigned flags =
prng32() & (MDBX_SAFE_NOSYNC | MDBX_NOMETASYNC | MDBX_MAPASYNC);
int err = mdbx_txn_begin(db_guard.get(), txn_guard.get(), flags, &txn);
if (unlikely(err != MDBX_SUCCESS))
failure_perror("mdbx_txn_begin(nested)", err);

View File

@@ -110,7 +110,7 @@ static void db_connect() {
MDBX_CHECK(mdbx_env_set_maxdbs(env, 30));
MDBX_CHECK(mdbx_env_open(env, opt_db_path,
MDBX_CREATE | MDBX_WRITEMAP | MDBX_MAPASYNC |
MDBX_NOSYNC | MDBX_LIFORECLAIM,
MDBX_SAFE_NOSYNC | MDBX_LIFORECLAIM,
0664));
MDBX_txn *txn;