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
8a5cf63c
Commit
8a5cf63c
authored
Apr 05, 2023
by
Vitaly Arbuzov
Browse files
Update comment related to eviction pool population and make check in the while loop more readable
parent
be34a1a4
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/evict.c
View file @
8a5cf63c
...
@@ -601,8 +601,8 @@ int performEvictions(void) {
...
@@ -601,8 +601,8 @@ int performEvictions(void) {
total_keys
+=
keys
;
total_keys
+=
keys
;
}
}
/* Since keys are distributed across smaller slot-specific dictionaries in cluster mode, we may need to
/* Since keys are distributed across smaller slot-specific dictionaries in cluster mode, we may need to
* visit more than one dictionary
when the number of keys is smal
l. */
* visit more than one dictionary
in order to populate required number of samples into eviction poo
l. */
}
while
(
keys
!=
0
&&
db
->
dict_count
>
1
&&
server
.
maxmemory_policy
&
MAXMEMORY_FLAG_ALLKEYS
&&
}
while
(
server
.
cluster_enabled
&&
keys
!=
0
&&
server
.
maxmemory_policy
&
MAXMEMORY_FLAG_ALLKEYS
&&
total_keys
<
(
unsigned
long
)
server
.
maxmemory_samples
total_keys
<
(
unsigned
long
)
server
.
maxmemory_samples
);
);
}
}
...
...
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