diff options
author | antirez <antirez@gmail.com> | 2019-11-05 10:14:34 +0100 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2019-11-05 10:14:34 +0100 |
commit | 824f5f0b7a1f32a6e6abf3d355d523d2c6e7bf09 (patch) | |
tree | 78fbba3312a290e0ccda13907665e44a1e261c67 /src/rdb.c | |
parent | e542132b07a76c73cd5e1dd067671afbb4c53fe6 (diff) | |
download | redis-824f5f0b7a1f32a6e6abf3d355d523d2c6e7bf09.tar.gz |
Update PR #6537 patch to for generality.
After the thread in #6537 and thanks to the suggestions received, this
commit updates the original patch in order to:
1. Solve the problem of updating the time in multiple places by updating
it in call().
2. Avoid introducing a new field but use our cached time.
This required some minor refactoring to the function updating the time,
and the introduction of a new cached time in microseconds in order to
use less gettimeofday() calls.
Diffstat (limited to 'src/rdb.c')
-rw-r--r-- | src/rdb.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1961,7 +1961,7 @@ void rdbLoadProgressCallback(rio *r, const void *buf, size_t len) { /* 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 * interaction time with clients and for other important things. */ - updateCachedTime(); + updateCachedTime(0); if (server.masterhost && server.repl_state == REPL_STATE_TRANSFER) replicationSendNewlineToMaster(); loadingProgress(r->processed_bytes); |