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
05dbc820
Commit
05dbc820
authored
May 14, 2015
by
antirez
Browse files
Sentinel: debugging code removed from sentinelSendPing()
parent
58d2bb95
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/sentinel.c
View file @
05dbc820
...
@@ -2453,15 +2453,6 @@ int sentinelForceHelloUpdateForMaster(sentinelRedisInstance *master) {
...
@@ -2453,15 +2453,6 @@ int sentinelForceHelloUpdateForMaster(sentinelRedisInstance *master) {
* On error zero is returned, and we can't consider the PING command
* On error zero is returned, and we can't consider the PING command
* queued in the connection. */
* queued in the connection. */
int sentinelSendPing(sentinelRedisInstance *ri) {
int sentinelSendPing(sentinelRedisInstance *ri) {
static unsigned long long counters[256];
static time_t last;
// printf("(%lld) PING %s\n", mstime(), sentinelGetInstanceTypeString(ri));
counters[ri->flags & (SRI_SLAVE|SRI_MASTER|SRI_SENTINEL)]++;
if (time(NULL)-last >= 5) {
printf("slave: %llu master: %llu sentinel: %llu\n",
counters[SRI_SLAVE], counters[SRI_MASTER], counters[SRI_SENTINEL]);
last = time(NULL);
}
int retval = redisAsyncCommand(ri->link->cc,
int retval = redisAsyncCommand(ri->link->cc,
sentinelPingReplyCallback, ri, "PING");
sentinelPingReplyCallback, ri, "PING");
if (retval == REDIS_OK) {
if (retval == REDIS_OK) {
...
...
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