Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
279e33be
Commit
279e33be
authored
Dec 27, 2009
by
antirez
Browse files
AOFSYNC command implemented
parent
7c8163b8
Changes
1
Show whitespace changes
Inline
Side-by-side
redis.c
View file @
279e33be
...
@@ -513,6 +513,7 @@ static void zscoreCommand(redisClient *c);
...
@@ -513,6 +513,7 @@ static void zscoreCommand(redisClient *c);
static
void
zremrangebyscoreCommand
(
redisClient
*
c
);
static
void
zremrangebyscoreCommand
(
redisClient
*
c
);
static
void
multiCommand
(
redisClient
*
c
);
static
void
multiCommand
(
redisClient
*
c
);
static
void
execCommand
(
redisClient
*
c
);
static
void
execCommand
(
redisClient
*
c
);
static
void
aofsyncCommand
(
redisClient
*
c
);
/*================================= Globals ================================= */
/*================================= Globals ================================= */
...
@@ -581,6 +582,7 @@ static struct redisCommand cmdTable[] = {
...
@@ -581,6 +582,7 @@ static struct redisCommand cmdTable[] = {
{
"save"
,
saveCommand
,
1
,
REDIS_CMD_INLINE
},
{
"save"
,
saveCommand
,
1
,
REDIS_CMD_INLINE
},
{
"bgsave"
,
bgsaveCommand
,
1
,
REDIS_CMD_INLINE
},
{
"bgsave"
,
bgsaveCommand
,
1
,
REDIS_CMD_INLINE
},
{
"bgrewriteaof"
,
bgrewriteaofCommand
,
1
,
REDIS_CMD_INLINE
},
{
"bgrewriteaof"
,
bgrewriteaofCommand
,
1
,
REDIS_CMD_INLINE
},
{
"aofsync"
,
aofsyncCommand
,
1
,
REDIS_CMD_INLINE
},
{
"shutdown"
,
shutdownCommand
,
1
,
REDIS_CMD_INLINE
},
{
"shutdown"
,
shutdownCommand
,
1
,
REDIS_CMD_INLINE
},
{
"lastsave"
,
lastsaveCommand
,
1
,
REDIS_CMD_INLINE
},
{
"lastsave"
,
lastsaveCommand
,
1
,
REDIS_CMD_INLINE
},
{
"type"
,
typeCommand
,
2
,
REDIS_CMD_INLINE
},
{
"type"
,
typeCommand
,
2
,
REDIS_CMD_INLINE
},
...
@@ -6231,6 +6233,13 @@ static void bgrewriteaofCommand(redisClient *c) {
...
@@ -6231,6 +6233,13 @@ static void bgrewriteaofCommand(redisClient *c) {
}
}
}
}
static
void
aofsyncCommand
(
redisClient
*
c
)
{
if
(
server
.
appendonly
)
fsync
(
server
.
appendfd
);
else
addReplySds
(
c
,
sdsnew
(
"-ERR Append Only File is not active
\r\n
"
));
}
static
void
aofRemoveTempFile
(
pid_t
childpid
)
{
static
void
aofRemoveTempFile
(
pid_t
childpid
)
{
char
tmpfile
[
256
];
char
tmpfile
[
256
];
...
...
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