disable online_delete for memdb, enforce ledger_history

This commit is contained in:
Richard Holland
2024-10-22 19:22:01 +11:00
parent 019d0ee527
commit 2bc5a8b1e8
2 changed files with 64 additions and 0 deletions

View File

@@ -127,6 +127,16 @@ SHAMapStoreImp::SHAMapStoreImp(
"online_delete info from config");
}
if ((!app_.config().section(SECTION_RELATIONAL_DB).empty() &&
boost::iequals(get(app.config().section(SECTION_RELATIONAL_DB), "backend"), "memory")) ||
(!app_.config().section("node_db").empty() &&
boost::iequals(get(app.config().section("node_db"), "type"), "memory")))
{
Throw<std::runtime_error>(
"Memory does not support online_delete. Remove "
"online_delete info from config. Use [ledger_history] to set a history limit.");
}
// Configuration that affects the behavior of online delete
get_if_exists(section, "delete_batch", deleteBatch_);
std::uint32_t temp;