renamed loaded key counter to be more clear

Former-commit-id: 8dc238efae8f6ba6b4ddc9b169e7195bcb43920b
This commit is contained in:
christianEQ 2021-01-12 19:00:25 +00:00 committed by John Sully
parent b113977e94
commit 588a37583e
3 changed files with 9 additions and 9 deletions

View File

@ -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. */

View File

@ -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 */
};

View File

@ -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;