Skip to content

Commit

Permalink
redisServer structure fields reordered for clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
antirez committed Jan 13, 2011
1 parent 2d9fdb9 commit 5b83160
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions src/redis.h
Original file line number Diff line number Diff line change
Expand Up @@ -356,27 +356,27 @@ struct sharedObjectsStruct {

/* Global server state structure */
struct redisServer {
/* General */
pthread_t mainthread;
redisDb *db;
dict *commands; /* Command table hahs table */
aeEventLoop *el;
/* Networking */
int port;
char *bindaddr;
char *unixsocket;
int ipfd;
int sofd;
redisDb *db;
long long dirty; /* changes to DB from the last save */
long long dirty_before_bgsave; /* used to restore dirty on failed BGSAVE */
list *clients;
dict *commands; /* Command table hahs table */
list *slaves, *monitors;
char neterr[ANET_ERR_LEN];
/* RDB / AOF loading information */
int loading;
off_t loading_total_bytes;
off_t loading_loaded_bytes;
time_t loading_start_time;
/* Fast pointers to often looked up command */
struct redisCommand *delCommand, *multiCommand;
list *slaves, *monitors;
char neterr[ANET_ERR_LEN];
aeEventLoop *el;
int cronloops; /* number of times the cron function run */
time_t lastsave; /* Unix time of last save succeeede */
/* Fields used only for stats */
Expand All @@ -399,6 +399,8 @@ struct redisServer {
int activerehashing;
char *requirepass;
/* Persistence */
long long dirty; /* changes to DB from the last save */
long long dirty_before_bgsave; /* used to restore dirty on failed BGSAVE */
time_t lastfsync;
int appendfd;
int appendseldb;
Expand Down

0 comments on commit 5b83160

Please sign in to comment.