Fix obtain the AOF file length error when load AOF (#9510)

this was a regression from #9012 (not released yet)
This commit is contained in:
chenyang8094 2021-09-26 15:24:52 +08:00 committed by GitHub
parent 3ff56a6dde
commit 7c1f9ef503
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1773,7 +1773,7 @@ void aofUpdateCurrentSize(void) {
mstime_t latency;
latencyStartMonitor(latency);
if (redis_fstat(server.aof_fd,&sb) == -1) {
if (redis_stat(server.aof_filename,&sb) == -1) {
serverLog(LL_WARNING,"Unable to obtain the AOF file length. stat: %s",
strerror(errno));
} else {