freeMemoryIfNeeded() small refactoring.

Related to issue #5686 and PR #5689.
This commit is contained in:
antirez
2018-12-12 11:37:15 +01:00
parent 7ae184bfea
commit 129f2d2746
4 changed files with 16 additions and 10 deletions

View File

@ -1248,7 +1248,7 @@ void configSetCommand(client *c) {
if (server.maxmemory < zmalloc_used_memory()) {
serverLog(LL_WARNING,"WARNING: the new maxmemory value set via CONFIG SET is smaller than the current memory usage. This will result in key eviction and/or the inability to accept new write commands depending on the maxmemory-policy.");
}
freeMemoryIfNeeded();
freeMemoryIfNeededAndSafe();
}
} config_set_memory_field(
"proto-max-bulk-len",server.proto_max_bulk_len) {