RocksDB implementations should be transactional #24

This commit is contained in:
Scott E. Graves 2024-12-11 11:36:56 -06:00
parent bb9892cc84
commit 7d5d52afe3

View File

@ -322,20 +322,20 @@ void rdb_meta_db::remove_api_path(const std::string &api_path) {
res = perform_action(function_name, res = perform_action(function_name,
[this, &api_path, &source_path]( [this, &api_path, &source_path](
rocksdb::Transaction *txn) -> rocksdb::Status { rocksdb::Transaction *txn) -> rocksdb::Status {
auto res = txn->Delete(pinned_family_, api_path); auto txn_res = txn->Delete(pinned_family_, api_path);
if (not res.ok()) { if (not txn_res.ok()) {
return res; return txn_res;
} }
res = txn->Delete(size_family_, api_path); txn_res = txn->Delete(size_family_, api_path);
if (not res.ok()) { if (not txn_res.ok()) {
return res; return txn_res;
} }
if (not source_path.empty()) { if (not source_path.empty()) {
res = txn->Delete(source_family_, source_path); txn_res = txn->Delete(source_family_, source_path);
if (not res.ok()) { if (not txn_res.ok()) {
return res; return txn_res;
} }
} }