Handle OOM errors for more types. Fix clang warnings and errors

This commit is contained in:
Roman Gershman 2022-05-18 21:53:40 +03:00
parent 30cf9541c2
commit 5e4aa0a1a8
20 changed files with 147 additions and 85 deletions

View file

@ -338,7 +338,11 @@ bool Transaction::RunInShard(EngineShard* shard) {
cb_ = nullptr; // We can do it because only a single thread runs the callback.
local_result_ = status;
} else {
CHECK_EQ(OpStatus::OK, status);
if (status == OpStatus::OUT_OF_MEMORY) {
local_result_ = status;
} else {
CHECK_EQ(OpStatus::OK, status);
}
}
} catch (std::bad_alloc&) {
// TODO: to log at most once per sec.