diff --git a/src/rdb.cpp b/src/rdb.cpp index 3724e01d4..6085e7a53 100644 --- a/src/rdb.cpp +++ b/src/rdb.cpp @@ -2169,7 +2169,7 @@ void rdbLoadProgressCallback(rio *r, const void *buf, size_t len) { if ((g_pserver->loading_process_events_interval_bytes && (r->processed_bytes + len)/g_pserver->loading_process_events_interval_bytes > r->processed_bytes/g_pserver->loading_process_events_interval_bytes) || (g_pserver->loading_process_events_interval_keys && - (r->loaded_keys >= g_pserver->loading_process_events_interval_keys))) + (r->keys_since_last_callback >= g_pserver->loading_process_events_interval_keys))) { /* The DB can take some non trivial amount of time to load. Update * our cached time since it is used to create and update the last @@ -2194,7 +2194,7 @@ void rdbLoadProgressCallback(rio *r, const void *buf, size_t len) { replicationFeedSlaves(g_pserver->slaves, g_pserver->replicaseldb, ping_argv, 1); decrRefCount(ping_argv[0]); - r->loaded_keys = 0; + r->keys_since_last_callback = 0; } } @@ -2501,7 +2501,7 @@ int rdbLoadRio(rio *rdb, int rdbflags, rdbSaveInfo *rsi) { if (g_pserver->key_load_delay) usleep(g_pserver->key_load_delay); - rdb->loaded_keys++; + rdb->keys_since_last_callback++; /* Reset the state that is key-specified and is populated by * opcodes before the key, so that we start from scratch again. */ diff --git a/src/rio.cpp b/src/rio.cpp index 90f3df80c..11c634849 100644 --- a/src/rio.cpp +++ b/src/rio.cpp @@ -94,7 +94,7 @@ static const rio rioBufferIO = { 0, /* current checksum */ 0, /* flags */ 0, /* bytes read or written */ - 0, /* keys loaded */ + 0, /* keys since last callback */ 0, /* read/write chunk size */ { { NULL, 0 } } /* union for io-specific vars */ }; @@ -149,7 +149,7 @@ static const rio rioFileIO = { 0, /* current checksum */ 0, /* flags */ 0, /* bytes read or written */ - 0, /* keys loaded */ + 0, /* keys since last callback */ 0, /* read/write chunk size */ { { NULL, 0 } } /* union for io-specific vars */ }; @@ -245,7 +245,7 @@ static const rio rioConnIO = { 0, /* current checksum */ 0, /* flags */ 0, /* bytes read or written */ - 0, /* keys loaded */ + 0, /* keys since last callback */ 0, /* read/write chunk size */ { { NULL, 0 } } /* union for io-specific vars */ }; @@ -364,7 +364,7 @@ static const rio rioFdIO = { 0, /* current checksum */ 0, /* flags */ 0, /* bytes read or written */ - 0, /* keys loaded */ + 0, /* keys since last callback */ 0, /* read/write chunk size */ { { NULL, 0 } } /* union for io-specific vars */ }; diff --git a/src/rio.h b/src/rio.h index d9e746596..ab00cf112 100644 --- a/src/rio.h +++ b/src/rio.h @@ -62,8 +62,8 @@ struct _rio { /* The current checksum and flags (see RIO_FLAG_*) */ uint64_t cksum, flags; - /* number of keys loaded in transaction */ - long int loaded_keys; + /* number of keys loaded since last rdbLoadProgressCallback */ + long int keys_since_last_callback; /* number of bytes read or written */ size_t processed_bytes;