fix dataloss on aof load with storage provider
Former-commit-id: 447c8601b5203346fdd4b956ad1ac87c4a6073c8
This commit is contained in:
parent
d443babbea
commit
ef9c1bd074
10
src/aof.cpp
10
src/aof.cpp
@ -870,6 +870,11 @@ int loadAppendOnlyFile(char *filename) {
|
||||
fakeClient = createAOFClient();
|
||||
startLoadingFile(fp, filename, RDBFLAGS_AOF_PREAMBLE);
|
||||
|
||||
for (int idb = 0; idb < cserver.dbnum; ++idb)
|
||||
{
|
||||
g_pserver->db[idb]->trackChanges(true);
|
||||
}
|
||||
|
||||
/* Check if this AOF file has an RDB preamble. In that case we need to
|
||||
* load the RDB file and later continue loading the AOF tail. */
|
||||
char sig[5]; /* "REDIS" */
|
||||
@ -892,11 +897,6 @@ int loadAppendOnlyFile(char *filename) {
|
||||
}
|
||||
}
|
||||
|
||||
for (int idb = 0; idb < cserver.dbnum; ++idb)
|
||||
{
|
||||
g_pserver->db[idb]->trackChanges(true);
|
||||
}
|
||||
|
||||
/* Read the actual AOF file, in REPL format, command by command. */
|
||||
while(1) {
|
||||
int argc, j;
|
||||
|
Loading…
x
Reference in New Issue
Block a user