mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-30 22:47:16 +08:00
mdbx: добавление поддержки MDBX_OUSTED
в mdbx_strerror()
и C++ API.
This commit is contained in:
parent
cb743d44fc
commit
2e7d325cf1
3
mdbx.h
3
mdbx.h
@ -1982,7 +1982,8 @@ typedef enum MDBX_error {
|
||||
* corresponding DBI-handle could be (re)used */
|
||||
MDBX_DANGLING_DBI = -30412,
|
||||
|
||||
/** Транзакция была асинхронно отменена/вытеснена */
|
||||
/** The parked read transaction was outed for the sake of
|
||||
* recycling old MVCC snapshots. */
|
||||
MDBX_OUSTED = -30411,
|
||||
|
||||
/* The last of MDBX-added error codes */
|
||||
|
1
mdbx.h++
1
mdbx.h++
@ -582,6 +582,7 @@ MDBX_DECLARE_EXCEPTION(transaction_full);
|
||||
MDBX_DECLARE_EXCEPTION(transaction_overlapping);
|
||||
MDBX_DECLARE_EXCEPTION(duplicated_lck_file);
|
||||
MDBX_DECLARE_EXCEPTION(dangling_map_id);
|
||||
MDBX_DECLARE_EXCEPTION(transaction_ousted);
|
||||
#undef MDBX_DECLARE_EXCEPTION
|
||||
|
||||
[[noreturn]] LIBMDBX_API void throw_too_small_target_buffer();
|
||||
|
@ -339,7 +339,7 @@ DEFINE_EXCEPTION(transaction_full)
|
||||
DEFINE_EXCEPTION(transaction_overlapping)
|
||||
DEFINE_EXCEPTION(duplicated_lck_file)
|
||||
DEFINE_EXCEPTION(dangling_map_id)
|
||||
|
||||
DEFINE_EXCEPTION(transaction_ousted)
|
||||
#undef DEFINE_EXCEPTION
|
||||
|
||||
__cold const char *error::what() const noexcept {
|
||||
@ -428,6 +428,7 @@ __cold void error::throw_exception() const {
|
||||
CASE_EXCEPTION(transaction_overlapping, MDBX_TXN_OVERLAPPING);
|
||||
CASE_EXCEPTION(duplicated_lck_file, MDBX_DUPLICATED_CLK);
|
||||
CASE_EXCEPTION(dangling_map_id, MDBX_DANGLING_DBI);
|
||||
CASE_EXCEPTION(transaction_ousted, MDBX_OUSTED);
|
||||
#undef CASE_EXCEPTION
|
||||
default:
|
||||
if (is_mdbx_error())
|
||||
|
@ -168,6 +168,9 @@ __cold const char *mdbx_liberr2str(int errnum) {
|
||||
case MDBX_DANGLING_DBI:
|
||||
return "MDBX_DANGLING_DBI: Some cursors and/or other resources should be"
|
||||
" closed before subDb or corresponding DBI-handle could be (re)used";
|
||||
case MDBX_OUSTED:
|
||||
return "MDBX_OUSTED: The parked read transaction was outed for the sake"
|
||||
" of recycling old MVCC snapshots";
|
||||
default:
|
||||
return nullptr;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user