Commit 6cfcf76e authored by huangzhw's avatar huangzhw Committed by Oran Agra
Browse files

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 a3d4d7bf)
parent c9478a3b
...@@ -7200,8 +7200,8 @@ void processModuleLoadingProgressEvent(int is_aof) { ...@@ -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,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment