Configurable synchronous I/O timeout

This commit is contained in:
Pieter Noordhuis
2011-05-22 12:57:30 +02:00
parent b075621fb7
commit 890a2ed989
3 changed files with 9 additions and 4 deletions

View File

@ -159,6 +159,9 @@
#define REDIS_REPL_TRANSFER 3 /* Receiving .rdb from master */
#define REDIS_REPL_CONNECTED 4 /* Connected to master */
/* Synchronous read timeout - slave side */
#define REDIS_REPL_SYNCIO_TIMEOUT 5
/* Slave replication state - from the point of view of master
* Note that in SEND_BULK and ONLINE state the slave receives new updates
* in its output queue. In the WAIT_BGSAVE state instead the server is waiting
@ -586,6 +589,7 @@ struct redisServer {
char *masterhost;
int masterport;
redisClient *master; /* client that is master for this slave */
int repl_syncio_timeout; /* timeout for synchronous I/O calls */
int replstate; /* replication status if the instance is a slave */
off_t repl_transfer_left; /* bytes left reading .rdb */
int repl_transfer_s; /* slave -> master SYNC socket */