Commit Graph

6 Commits

Author SHA1 Message Date
antirez
af3853c3bf syncio.c read / write functions reworked for correctness and performance.
The new implementation start reading / writing before blocking with
aeWait(), likely the descriptor can accept writes or has buffered data
inside and we can go faster, otherwise we get an error and wait.

This change has effects on speed but also on correctness: on socket
errors when we perform non blocking connect(2) write is performed ASAP
and the error is returned ASAP before waiting.

So the practical effect is that now a Redis slave is more available if it
can not connect to the master, previously the slave continued to block on
syncWrite() trying to send SYNC, and serving commands very slowly.
2012-05-02 22:41:50 +02:00
antirez
04d360fdcd Better syncio.c with millisecond resolution. 2012-03-31 11:21:45 +02:00
Pieter Noordhuis
7271198cf0 Use rio.h functions in aof.c 2011-05-14 12:36:22 +02:00
antirez
ecc9109434 Cluster branch merged to unstable. 2011-03-29 17:51:15 +02:00
antirez
d08fac3eb9 more generally usable i/o functions moved to syncio.c 2010-10-25 10:53:28 +02:00
antirez
19e61097c5 synchronous I/O networking functions originally used just for replication refactored in a file as generally useful, they are used in the cluster branch for MIGRATE. 2010-10-24 16:22:52 +02:00