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
5b831607
Commit
5b831607
authored
Jan 14, 2011
by
antirez
Browse files
redisServer structure fields reordered for clarity
parent
2d9fdb9d
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/redis.h
View file @
5b831607
...
@@ -356,17 +356,20 @@ struct sharedObjectsStruct {
...
@@ -356,17 +356,20 @@ struct sharedObjectsStruct {
/* Global server state structure */
/* Global server state structure */
struct
redisServer
{
struct
redisServer
{
/* General */
pthread_t
mainthread
;
pthread_t
mainthread
;
redisDb
*
db
;
dict
*
commands
;
/* Command table hahs table */
aeEventLoop
*
el
;
/* Networking */
int
port
;
int
port
;
char
*
bindaddr
;
char
*
bindaddr
;
char
*
unixsocket
;
char
*
unixsocket
;
int
ipfd
;
int
ipfd
;
int
sofd
;
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
;
list
*
clients
;
dict
*
commands
;
/* Command table hahs table */
list
*
slaves
,
*
monitors
;
char
neterr
[
ANET_ERR_LEN
];
/* RDB / AOF loading information */
/* RDB / AOF loading information */
int
loading
;
int
loading
;
off_t
loading_total_bytes
;
off_t
loading_total_bytes
;
...
@@ -374,9 +377,6 @@ struct redisServer {
...
@@ -374,9 +377,6 @@ struct redisServer {
time_t
loading_start_time
;
time_t
loading_start_time
;
/* Fast pointers to often looked up command */
/* Fast pointers to often looked up command */
struct
redisCommand
*
delCommand
,
*
multiCommand
;
struct
redisCommand
*
delCommand
,
*
multiCommand
;
list
*
slaves
,
*
monitors
;
char
neterr
[
ANET_ERR_LEN
];
aeEventLoop
*
el
;
int
cronloops
;
/* number of times the cron function run */
int
cronloops
;
/* number of times the cron function run */
time_t
lastsave
;
/* Unix time of last save succeeede */
time_t
lastsave
;
/* Unix time of last save succeeede */
/* Fields used only for stats */
/* Fields used only for stats */
...
@@ -399,6 +399,8 @@ struct redisServer {
...
@@ -399,6 +399,8 @@ struct redisServer {
int
activerehashing
;
int
activerehashing
;
char
*
requirepass
;
char
*
requirepass
;
/* Persistence */
/* 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
;
time_t
lastfsync
;
int
appendfd
;
int
appendfd
;
int
appendseldb
;
int
appendseldb
;
...
...
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