Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
51b627d9
Commit
51b627d9
authored
Sep 05, 2018
by
antirez
Browse files
Don't perform eviction when re-entering the event loop.
Related to #5250.
parent
4e5e0d37
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/server.c
View file @
51b627d9
...
@@ -2593,8 +2593,13 @@ int processCommand(client *c) {
...
@@ -2593,8 +2593,13 @@ int processCommand(client *c) {
*
*
* First we try to free some memory if possible (if there are volatile
* First we try to free some memory if possible (if there are volatile
* keys in the dataset). If there are not the only thing we can do
* keys in the dataset). If there are not the only thing we can do
* is returning an error. */
* is returning an error.
if
(
server
.
maxmemory
)
{
*
* Note that we do not want to reclaim memory if we are here re-entering
* the event loop since there is a busy Lua script running in timeout
* condition, to avoid mixing the propagation of scripts with the propagation
* of DELs due to eviction. */
if
(
server
.
maxmemory
&&
!
server
.
lua_timedout
)
{
int
out_of_memory
=
freeMemoryIfNeeded
()
==
C_ERR
;
int
out_of_memory
=
freeMemoryIfNeeded
()
==
C_ERR
;
/* freeMemoryIfNeeded may flush slave output buffers. This may result
/* freeMemoryIfNeeded may flush slave output buffers. This may result
* into a slave, that may be the active client, to be freed. */
* into a slave, that may be the active client, to be freed. */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment