X-Git-Url: https://git.saurik.com/redis.git/blobdiff_plain/3bb3f1253955e8296d8593e2a7d39266bd6af7eb..48d26a483dbe7960e61484feedf7462761a71af7:/src/redis.h diff --git a/src/redis.h b/src/redis.h index 2dcd44f8..1dce7b7a 100644 --- a/src/redis.h +++ b/src/redis.h @@ -57,10 +57,9 @@ #define REDIS_SLOWLOG_MAX_LEN 128 #define REDIS_MAX_CLIENTS 10000 #define REDIS_AUTHPASS_MAX_LEN 512 - +#define REDIS_DEFAULT_SLAVE_PRIORITY 100 #define REDIS_REPL_TIMEOUT 60 #define REDIS_REPL_PING_SLAVE_PERIOD 10 - #define REDIS_RUN_ID_SIZE 40 #define REDIS_OPS_SEC_SAMPLES 16 @@ -517,6 +516,7 @@ struct redisServer { time_t aof_last_fsync; /* UNIX time of last fsync() */ time_t aof_rewrite_time_last; /* Time used by last AOF rewrite run. */ time_t aof_rewrite_time_start; /* Current AOF rewrite start time. */ + int aof_lastbgrewrite_status; /* REDIS_OK or REDIS_ERR */ unsigned long aof_delayed_fsync; /* delayed AOF fsync() counter */ /* RDB persistence */ long long dirty; /* Changes to DB from the last save */ @@ -548,7 +548,9 @@ struct redisServer { redisClient *master; /* Client that is master for this slave */ int repl_syncio_timeout; /* Timeout for synchronous I/O calls */ int repl_state; /* Replication status if the instance is a slave */ - off_t repl_transfer_left; /* Bytes left reading .rdb */ + off_t repl_transfer_size; /* Size of RDB to read from master during sync. */ + off_t repl_transfer_read; /* Amount of RDB read from master during sync. */ + off_t repl_transfer_last_fsync_off; /* Offset when we fsync-ed last time. */ int repl_transfer_s; /* Slave -> Master SYNC socket */ int repl_transfer_fd; /* Slave -> Master SYNC temp file descriptor */ char *repl_transfer_tmpfile; /* Slave-> master SYNC temp file name */ @@ -556,6 +558,7 @@ struct redisServer { int repl_serve_stale_data; /* Serve stale data when link is down? */ int repl_slave_ro; /* Slave is read only? */ time_t repl_down_since; /* Unix time at which link with master went down */ + int slave_priority; /* Reported in INFO and used by Sentinel. */ /* Limits */ unsigned int maxclients; /* Max number of simultaneous clients */ unsigned long long maxmemory; /* Max number of memory bytes to use */