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
b25b61eb
Commit
b25b61eb
authored
Jul 21, 2010
by
antirez
Browse files
vm_blocked_clients count fixed in INFO, thanks to Pietern Noordhuis
parent
243b914b
Changes
1
Show whitespace changes
Inline
Side-by-side
redis.c
View file @
b25b61eb
...
@@ -2026,18 +2026,25 @@ static void freeClient(redisClient *c) {
...
@@ -2026,18 +2026,25 @@ static void freeClient(redisClient *c) {
ln = listSearchKey(server.clients,c);
ln = listSearchKey(server.clients,c);
redisAssert(ln != NULL);
redisAssert(ln != NULL);
listDelNode(server.clients,ln);
listDelNode(server.clients,ln);
/* Remove from the list of clients waiting for swapped keys */
/* Remove from the list of clients waiting for swapped keys, or ready
if
(
c
->
flags
&
REDIS_IO_WAIT
&&
listLength
(
c
->
io_keys
)
==
0
)
{
* to be restarted, but not yet woken up again. */
if (c->flags & REDIS_IO_WAIT) {
redisAssert(server.vm_enabled);
if (listLength(c->io_keys) == 0) {
ln = listSearchKey(server.io_ready_clients,c);
ln = listSearchKey(server.io_ready_clients,c);
if
(
ln
)
{
/* When this client is waiting to be woken up (REDIS_IO_WAIT),
* it should be present in the list io_ready_clients */
redisAssert(ln != NULL);
listDelNode(server.io_ready_clients,ln);
listDelNode(server.io_ready_clients,ln);
server
.
vm_blocked_clients
--
;
} else {
}
while (listLength(c->io_keys)) {
}
while
(
server
.
vm_enabled
&&
listLength
(
c
->
io_keys
))
{
ln = listFirst(c->io_keys);
ln = listFirst(c->io_keys);
dontWaitForSwappedKey(c,ln->value);
dontWaitForSwappedKey(c,ln->value);
}
}
}
server.vm_blocked_clients--;
}
listRelease(c->io_keys);
listRelease(c->io_keys);
/* Master/slave cleanup */
/* Master/slave cleanup */
if (c->flags & REDIS_SLAVE) {
if (c->flags & REDIS_SLAVE) {
...
...
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