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
7ae184bf
Unverified
Commit
7ae184bf
authored
Dec 12, 2018
by
Salvatore Sanfilippo
Committed by
GitHub
Dec 12, 2018
Browse files
Merge pull request #5689 from soloestoy/donot-evict-when-AOF-loading
evict: don't care about mem if loading
parents
03e2bb0c
b9cd89d1
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/evict.c
View file @
7ae184bf
...
@@ -444,9 +444,15 @@ int getMaxmemoryState(size_t *total, size_t *logical, size_t *tofree, float *lev
...
@@ -444,9 +444,15 @@ int getMaxmemoryState(size_t *total, size_t *logical, size_t *tofree, float *lev
* Otehrwise if we are over the memory limit, but not enough memory
* Otehrwise if we are over the memory limit, but not enough memory
* was freed to return back under the limit, the function returns C_ERR. */
* was freed to return back under the limit, the function returns C_ERR. */
int
freeMemoryIfNeeded
(
void
)
{
int
freeMemoryIfNeeded
(
void
)
{
/* By default slaves should ignore maxmemory and just be masters excat
/* By default replicas should ignore maxmemory
* copies. */
* and just be masters exact copies.
if
(
server
.
masterhost
&&
server
.
repl_slave_ignore_maxmemory
)
return
C_OK
;
*
* And don't care about mem if loading. */
if
(
server
.
loading
||
(
server
.
masterhost
&&
server
.
repl_slave_ignore_maxmemory
))
{
return
C_OK
;
}
size_t
mem_reported
,
mem_tofree
,
mem_freed
;
size_t
mem_reported
,
mem_tofree
,
mem_freed
;
mstime_t
latency
,
eviction_latency
;
mstime_t
latency
,
eviction_latency
;
...
...
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