diff --git a/mdbx.h b/mdbx.h index edfd3df2..9ae8b798 100644 --- a/mdbx.h +++ b/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 */ diff --git a/mdbx.h++ b/mdbx.h++ index 58a2b7ce..9d2197bb 100644 --- a/mdbx.h++ +++ b/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(); diff --git a/src/mdbx.c++ b/src/mdbx.c++ index 583b46a4..adef7c34 100644 --- a/src/mdbx.c++ +++ b/src/mdbx.c++ @@ -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()) diff --git a/src/misc.c b/src/misc.c index 5c61d641..b6839c11 100644 --- a/src/misc.c +++ b/src/misc.c @@ -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; }