renamed loaded key counter to be more clear
Former-commit-id: 8dc238efae8f6ba6b4ddc9b169e7195bcb43920b
This commit is contained in:
parent
b113977e94
commit
588a37583e
@ -2169,7 +2169,7 @@ void rdbLoadProgressCallback(rio *r, const void *buf, size_t len) {
|
|||||||
if ((g_pserver->loading_process_events_interval_bytes &&
|
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) ||
|
(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 &&
|
(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
|
/* 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
|
* 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);
|
replicationFeedSlaves(g_pserver->slaves, g_pserver->replicaseldb, ping_argv, 1);
|
||||||
decrRefCount(ping_argv[0]);
|
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)
|
if (g_pserver->key_load_delay)
|
||||||
usleep(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
|
/* Reset the state that is key-specified and is populated by
|
||||||
* opcodes before the key, so that we start from scratch again. */
|
* opcodes before the key, so that we start from scratch again. */
|
||||||
|
@ -94,7 +94,7 @@ static const rio rioBufferIO = {
|
|||||||
0, /* current checksum */
|
0, /* current checksum */
|
||||||
0, /* flags */
|
0, /* flags */
|
||||||
0, /* bytes read or written */
|
0, /* bytes read or written */
|
||||||
0, /* keys loaded */
|
0, /* keys since last callback */
|
||||||
0, /* read/write chunk size */
|
0, /* read/write chunk size */
|
||||||
{ { NULL, 0 } } /* union for io-specific vars */
|
{ { NULL, 0 } } /* union for io-specific vars */
|
||||||
};
|
};
|
||||||
@ -149,7 +149,7 @@ static const rio rioFileIO = {
|
|||||||
0, /* current checksum */
|
0, /* current checksum */
|
||||||
0, /* flags */
|
0, /* flags */
|
||||||
0, /* bytes read or written */
|
0, /* bytes read or written */
|
||||||
0, /* keys loaded */
|
0, /* keys since last callback */
|
||||||
0, /* read/write chunk size */
|
0, /* read/write chunk size */
|
||||||
{ { NULL, 0 } } /* union for io-specific vars */
|
{ { NULL, 0 } } /* union for io-specific vars */
|
||||||
};
|
};
|
||||||
@ -245,7 +245,7 @@ static const rio rioConnIO = {
|
|||||||
0, /* current checksum */
|
0, /* current checksum */
|
||||||
0, /* flags */
|
0, /* flags */
|
||||||
0, /* bytes read or written */
|
0, /* bytes read or written */
|
||||||
0, /* keys loaded */
|
0, /* keys since last callback */
|
||||||
0, /* read/write chunk size */
|
0, /* read/write chunk size */
|
||||||
{ { NULL, 0 } } /* union for io-specific vars */
|
{ { NULL, 0 } } /* union for io-specific vars */
|
||||||
};
|
};
|
||||||
@ -364,7 +364,7 @@ static const rio rioFdIO = {
|
|||||||
0, /* current checksum */
|
0, /* current checksum */
|
||||||
0, /* flags */
|
0, /* flags */
|
||||||
0, /* bytes read or written */
|
0, /* bytes read or written */
|
||||||
0, /* keys loaded */
|
0, /* keys since last callback */
|
||||||
0, /* read/write chunk size */
|
0, /* read/write chunk size */
|
||||||
{ { NULL, 0 } } /* union for io-specific vars */
|
{ { NULL, 0 } } /* union for io-specific vars */
|
||||||
};
|
};
|
||||||
|
@ -62,8 +62,8 @@ struct _rio {
|
|||||||
/* The current checksum and flags (see RIO_FLAG_*) */
|
/* The current checksum and flags (see RIO_FLAG_*) */
|
||||||
uint64_t cksum, flags;
|
uint64_t cksum, flags;
|
||||||
|
|
||||||
/* number of keys loaded in transaction */
|
/* number of keys loaded since last rdbLoadProgressCallback */
|
||||||
long int loaded_keys;
|
long int keys_since_last_callback;
|
||||||
|
|
||||||
/* number of bytes read or written */
|
/* number of bytes read or written */
|
||||||
size_t processed_bytes;
|
size_t processed_bytes;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user