mdbx++: добавление txn::commit_embark_read().

This commit is contained in:
Леонид Юрьев (Leonid Yuriev)
2023-11-21 15:17:07 +03:00
parent b9e2f6dc09
commit 55142d8d6f
2 changed files with 11 additions and 0 deletions

View File

@@ -1555,6 +1555,13 @@ void txn_managed::commit(commit_latency *latency) {
MDBX_CXX20_UNLIKELY err.throw_exception();
}
void txn_managed::commit_embark_read() {
auto env = this->env();
commit();
error::success_or_throw(
::mdbx_txn_begin(env, nullptr, MDBX_TXN_RDONLY, &handle_));
}
//------------------------------------------------------------------------------
bool txn::drop_map(const char *name, bool throw_if_absent) {