]> git.saurik.com Git - redis.git/blobdiff - src/rdb.c
Invert two sides of if expression in SET to avoid a lookup.
[redis.git] / src / rdb.c
index fd9fcacf2de3e855d88e5d8ec123d1a554caf4c3..b7ce8858e60a8a6538d431d8d8119d4707caca51 100644 (file)
--- a/src/rdb.c
+++ b/src/rdb.c
@@ -1010,6 +1010,8 @@ void startLoading(FILE *fp) {
 /* Refresh the loading progress info */
 void loadingProgress(off_t pos) {
     server.loading_loaded_bytes = pos;
+    if (server.stat_peak_memory < zmalloc_used_memory())
+        server.stat_peak_memory = zmalloc_used_memory();
 }
 
 /* Loading finished */