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
5fa95ad7
Commit
5fa95ad7
authored
Dec 06, 2010
by
Pieter Noordhuis
Browse files
Rename blpop_blocked_clients to bpop_blocked_clients
parent
c8a0070a
Changes
3
Show whitespace changes
Inline
Side-by-side
src/redis.c
View file @
5fa95ad7
...
...
@@ -573,7 +573,7 @@ int serverCron(struct aeEventLoop *eventLoop, long long id, void *clientData) {
}
/* Close connections of timedout clients */
if
((
server
.
maxidletime
&&
!
(
loops
%
100
))
||
server
.
b
l
pop_blocked_clients
)
if
((
server
.
maxidletime
&&
!
(
loops
%
100
))
||
server
.
bpop_blocked_clients
)
closeTimedoutClients
();
/* Check if a background saving or AOF rewrite in progress terminated */
...
...
@@ -759,7 +759,7 @@ void initServerConfig() {
server
.
rdbcompression
=
1
;
server
.
activerehashing
=
1
;
server
.
maxclients
=
0
;
server
.
b
l
pop_blocked_clients
=
0
;
server
.
bpop_blocked_clients
=
0
;
server
.
maxmemory
=
0
;
server
.
maxmemory_policy
=
REDIS_MAXMEMORY_VOLATILE_LRU
;
server
.
maxmemory_samples
=
3
;
...
...
@@ -1170,7 +1170,7 @@ sds genRedisInfoString(void) {
(
float
)
c_ru
.
ru_stime
.
tv_sec
+
(
float
)
c_ru
.
ru_stime
.
tv_usec
/
1000000
,
listLength
(
server
.
clients
)
-
listLength
(
server
.
slaves
),
listLength
(
server
.
slaves
),
server
.
b
l
pop_blocked_clients
,
server
.
bpop_blocked_clients
,
zmalloc_used_memory
(),
hmem
,
zmalloc_get_rss
(),
...
...
src/redis.h
View file @
5fa95ad7
...
...
@@ -433,7 +433,7 @@ struct redisServer {
int
maxmemory_policy
;
int
maxmemory_samples
;
/* Blocked clients */
unsigned
int
b
l
pop_blocked_clients
;
unsigned
int
bpop_blocked_clients
;
unsigned
int
vm_blocked_clients
;
/* Sort parameters - qsort_r() is only available under BSD so we
* have to take this state global, in order to pass it to sortCompare() */
...
...
src/t_list.c
View file @
5fa95ad7
...
...
@@ -725,7 +725,7 @@ void blockForKeys(redisClient *c, robj **keys, int numkeys, time_t timeout, robj
}
/* Mark the client as a blocked client */
c
->
flags
|=
REDIS_BLOCKED
;
server
.
b
l
pop_blocked_clients
++
;
server
.
bpop_blocked_clients
++
;
}
/* Unblock a client that's waiting in a blocking operation such as BLPOP */
...
...
@@ -753,7 +753,7 @@ void unblockClientWaitingData(redisClient *c) {
c
->
bpop
.
keys
=
NULL
;
c
->
bpop
.
target
=
NULL
;
c
->
flags
&=
(
~
REDIS_BLOCKED
);
server
.
b
l
pop_blocked_clients
--
;
server
.
bpop_blocked_clients
--
;
/* We want to process data if there is some command waiting
* in the input buffer. Note that this is safe even if
* unblockClientWaitingData() gets called from freeClient() because
...
...
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