summaryrefslogtreecommitdiff
path: root/src/zmalloc.h
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2014-11-11 17:12:12 +0100
committerantirez <antirez@gmail.com>2014-11-11 17:12:12 +0100
commitbb7fea0d5ca7b3a53532338e8654e409014c1194 (patch)
treed64d67df2e9777be866741578164ff262f3cd0a1 /src/zmalloc.h
parentf5c6ebbfe3620d16c1e83c2ccaf1cec5a312aaae (diff)
downloadredis-bb7fea0d5ca7b3a53532338e8654e409014c1194.tar.gz
Diskless SYNC: fix RDB EOF detection.
RDB EOF detection was relying on the final part of the RDB transfer to be a magic 40 bytes EOF marker. However as the slave is put online immediately, and because of sockets timeouts, the replication stream is actually contiguous with the RDB file. This means that to detect the EOF correctly we should either: 1) Scan all the stream searching for the mark. Sucks CPU-wise. 2) Start to send the replication stream only after an acknowledge. 3) Implement a proper chunked encoding. For now solution "2" was picked, so the master does not start to send ASAP the stream of commands in the case of diskless replication. We wait for the first REPLCONF ACK command from the slave, that certifies us that the slave correctly loaded the RDB file and is ready to get more data.
Diffstat (limited to 'src/zmalloc.h')
0 files changed, 0 insertions, 0 deletions