• A
    Update cached time in rdbLoad() callback. · 3c1672da
    antirez 提交于
    server.unixtime and server.mstime are cached less precise timestamps
    that we use every time we don't need an accurate time representation and
    a syscall would be too slow for the number of calls we require.
    
    Such an example is the initialization and update process of the last
    interaction time with the client, that is used for timeouts.
    
    However rdbLoad() can take some time to load the DB, but at the same
    time it did not updated the time during DB loading. This resulted in the
    bug described in issue #1535, where in the replication process the slave
    loads the DB, creates the redisClient representation of its master, but
    the timestamp is so old that the master, under certain conditions, is
    sensed as already "timed out".
    
    Thanks to @yoav-steinberg and Redis Labs Inc for the bug report and
    analysis.
    3c1672da
rdb.c 43.1 KB