mirror of
https://github.com/isar/libmdbx.git
synced 2025-08-23 21:14:28 +08:00
mdbx++: добавление обработки MDBX_MVCC_RETARDED
в C++ API.
This commit is contained in:
@@ -340,6 +340,7 @@ DEFINE_EXCEPTION(transaction_overlapping)
|
||||
DEFINE_EXCEPTION(duplicated_lck_file)
|
||||
DEFINE_EXCEPTION(dangling_map_id)
|
||||
DEFINE_EXCEPTION(transaction_ousted)
|
||||
DEFINE_EXCEPTION(mvcc_retarded)
|
||||
#undef DEFINE_EXCEPTION
|
||||
|
||||
__cold const char *error::what() const noexcept {
|
||||
@@ -429,6 +430,7 @@ __cold void error::throw_exception() const {
|
||||
CASE_EXCEPTION(duplicated_lck_file, MDBX_DUPLICATED_CLK);
|
||||
CASE_EXCEPTION(dangling_map_id, MDBX_DANGLING_DBI);
|
||||
CASE_EXCEPTION(transaction_ousted, MDBX_OUSTED);
|
||||
CASE_EXCEPTION(mvcc_retarded, MDBX_MVCC_RETARDED);
|
||||
#undef CASE_EXCEPTION
|
||||
default:
|
||||
if (is_mdbx_error())
|
||||
|
@@ -210,6 +210,10 @@ __cold const char *mdbx_liberr2str(int errnum) {
|
||||
case MDBX_OUSTED:
|
||||
return "MDBX_OUSTED: The parked read transaction was outed for the sake"
|
||||
" of recycling old MVCC snapshots";
|
||||
case MDBX_MVCC_RETARDED:
|
||||
return "MDBX_MVCC_RETARDED: MVCC snapshot used by read transaction"
|
||||
" is outdated and could not be copied"
|
||||
" since corresponding meta-pages was overwritten";
|
||||
default:
|
||||
return nullptr;
|
||||
}
|
||||
|
Reference in New Issue
Block a user