mirror of
https://github.com/fluencelabs/redis
synced 2025-03-18 16:40:50 +00:00
Better variable meaning in processCommand().
This commit is contained in:
parent
66b5afdaa4
commit
abf52c7cf4
@ -2594,14 +2594,14 @@ int processCommand(client *c) {
|
||||
* keys in the dataset). If there are not the only thing we can do
|
||||
* is returning an error. */
|
||||
if (server.maxmemory) {
|
||||
int retval = freeMemoryIfNeeded();
|
||||
int out_of_memory = freeMemoryIfNeeded() == C_ERR;
|
||||
/* freeMemoryIfNeeded may flush slave output buffers. This may result
|
||||
* into a slave, that may be the active client, to be freed. */
|
||||
if (server.current_client == NULL) return C_ERR;
|
||||
|
||||
/* It was impossible to free enough memory, and the command the client
|
||||
* is trying to execute is denied during OOM conditions? Error. */
|
||||
if ((c->cmd->flags & CMD_DENYOOM) && retval == C_ERR) {
|
||||
if ((c->cmd->flags & CMD_DENYOOM) && out_of_memory) {
|
||||
flagTransaction(c);
|
||||
addReply(c, shared.oomerr);
|
||||
return C_OK;
|
||||
|
Loading…
x
Reference in New Issue
Block a user