RedisModuleEvent_LoadingProgress always at 100% progress (#7685)
It was also using the wrong struct, but luckily RedisModuleFlushInfo and RedisModuleLoadingProgress are identical. (cherry picked from commit b980e999293e9214a844712f9c88ca69acd20b1b)
This commit is contained in:
parent
d0b8583167
commit
907b0124e8
@ -7200,8 +7200,8 @@ void processModuleLoadingProgressEvent(int is_aof) {
|
|||||||
/* Fire the loading progress modules end event. */
|
/* Fire the loading progress modules end event. */
|
||||||
int progress = -1;
|
int progress = -1;
|
||||||
if (server.loading_total_bytes)
|
if (server.loading_total_bytes)
|
||||||
progress = (server.loading_total_bytes<<10) / server.loading_total_bytes;
|
progress = (server.loading_loaded_bytes<<10) / server.loading_total_bytes;
|
||||||
RedisModuleFlushInfoV1 fi = {REDISMODULE_LOADING_PROGRESS_VERSION,
|
RedisModuleLoadingProgressV1 fi = {REDISMODULE_LOADING_PROGRESS_VERSION,
|
||||||
server.hz,
|
server.hz,
|
||||||
progress};
|
progress};
|
||||||
moduleFireServerEvent(REDISMODULE_EVENT_LOADING_PROGRESS,
|
moduleFireServerEvent(REDISMODULE_EVENT_LOADING_PROGRESS,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user