Assert only if metadata flag is enabled

This commit is contained in:
gvolfing 2024-03-22 11:41:02 +01:00
parent 6f18117b0a
commit 6b7e1d8a9f

View File

@ -1872,7 +1872,9 @@ void InMemoryStorage::CollectGarbage(std::unique_lock<utils::ResourceLock> main_
auto edge_metadata_acc = edges_metadata_.access();
for (auto edge : current_deleted_edges) {
MG_ASSERT(edge_acc.remove(edge), "Invalid database state!");
MG_ASSERT(edge_metadata_acc.remove(edge), "Invalid database state!");
if (config_.salient.items.enable_edges_metadata) {
MG_ASSERT(edge_metadata_acc.remove(edge), "Invalid database state!");
}
}
}