chore: decrease logs severity for OOM from error to warning (#4031)

This commit is contained in:
Borys 2024-11-01 11:12:28 +02:00 committed by GitHub
parent 30728021d0
commit cd2ab4a585
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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;
}