Skip to content

Commit b3b92fd

Browse files
committed
no memory limit on load and replication
Signed-off-by: adi_holden <[email protected]>
1 parent 1705817 commit b3b92fd

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/server/db_slice.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ tuple<PrimeIterator, ExpireIterator, bool> DbSlice::AddOrFind2(const Context& cn
416416
apply_memory_limit};
417417

418418
// If we are over limit in non-cache scenario, just be conservative and throw.
419-
if (!caching_mode_ && evp.mem_budget() < 0) {
419+
if (apply_memory_limit && !caching_mode_ && evp.mem_budget() < 0) {
420420
VLOG(1) << "AddOrFind2: over limit, budget: " << evp.mem_budget();
421421
events_.insertion_rejections++;
422422
throw bad_alloc();

src/server/main_service.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -914,7 +914,7 @@ void Service::DispatchCommand(CmdArgList args, facade::ConnectionContext* cntx)
914914

915915
uint64_t start_ns = absl::GetCurrentTimeNanos();
916916

917-
if (cid->opt_mask() & CO::DENYOOM) {
917+
if (cid->opt_mask() & CO::DENYOOM && etl.is_master) {
918918
uint64_t used_memory = etl.GetUsedMemory(start_ns);
919919
double oom_deny_ratio = GetFlag(FLAGS_oom_deny_ratio);
920920
if (used_memory > (max_memory_limit * oom_deny_ratio)) {

0 commit comments

Comments
 (0)