mirror of
https://github.com/dragonflydb/dragonfly
synced 2024-11-23 08:02:08 +00:00
chore: decrease logs severity for OOM from error to warning (#4031)
This commit is contained in:
parent
30728021d0
commit
cd2ab4a585
@ -609,8 +609,8 @@ OpResult<DbSlice::AddOrFindResult> DbSlice::AddOrFindInternal(const Context& cnt
|
||||
|
||||
// If we are over limit in non-cache scenario, just be conservative and throw.
|
||||
if (apply_memory_limit && !caching_mode_ && memory_budget_ + memory_offset < 0) {
|
||||
LOG_EVERY_T(ERROR, 1) << "AddOrFind: over limit, budget: " << memory_budget_
|
||||
<< " reclaimed: " << reclaimed << " offset: " << memory_offset;
|
||||
LOG_EVERY_T(WARNING, 1) << "AddOrFind: over limit, budget: " << memory_budget_
|
||||
<< " reclaimed: " << reclaimed << " offset: " << memory_offset;
|
||||
events_.insertion_rejections++;
|
||||
return OpStatus::OUT_OF_MEMORY;
|
||||
}
|
||||
@ -629,8 +629,8 @@ OpResult<DbSlice::AddOrFindResult> DbSlice::AddOrFindInternal(const Context& cnt
|
||||
try {
|
||||
it = db.prime.InsertNew(std::move(co_key), PrimeValue{}, evp);
|
||||
} catch (bad_alloc& e) {
|
||||
LOG_EVERY_T(ERROR, 1) << "AddOrFind: InsertNew failed, budget: " << memory_budget_
|
||||
<< " reclaimed: " << reclaimed << " offset: " << memory_offset;
|
||||
LOG_EVERY_T(WARNING, 1) << "AddOrFind: InsertNew failed, budget: " << memory_budget_
|
||||
<< " reclaimed: " << reclaimed << " offset: " << memory_offset;
|
||||
events_.insertion_rejections++;
|
||||
return OpStatus::OUT_OF_MEMORY;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user