summaryrefslogtreecommitdiff
path: root/src/rio.c
Commit message (Collapse)AuthorAgeFilesLines
* Rio: remember read/write error conditions.antirez2019-07-171-0/+4
|
* Diskless replica: fix mispelled var name.antirez2019-07-101-1/+1
|
* Diskless replica: a few aesthetic changes to rio.cantirez2019-07-081-25/+32
|
* Diskless replica: a few aesthetic changes to replication.c.antirez2019-07-081-5/+7
|
* diskless replication on slave side (don't store rdb to file), plus some ↵Oran Agra2019-07-081-1/+108
| | | | | | | | | | | | | | | | | | | | | | | | | | | other related fixes The implementation of the diskless replication was currently diskless only on the master side. The slave side was still storing the received rdb file to the disk before loading it back in and parsing it. This commit adds two modes to load rdb directly from socket: 1) when-empty 2) using "swapdb" the third mode of using diskless slave by flushdb is risky and currently not included. other changes: -------------- distinguish between aof configuration and state so that we can re-enable aof only when sync eventually succeeds (and not when exiting from readSyncBulkPayload after a failed attempt) also a CONFIG GET and INFO during rdb loading would have lied When loading rdb from the network, don't kill the server on short read (that can be a network error) Fix rdb check when performed on preamble AOF tests: run replication tests for diskless slave too make replication test a bit more aggressive Add test for diskless load swapdb
* rdb: incremental fsync when redis saves rdbzhaozhao.zz2018-03-161-1/+1
|
* fix processing of large bulks (above 2GB)Oran Agra2017-12-291-1/+1
| | | | | | | | | - protocol parsing (processMultibulkBuffer) was limitted to 32big positions in the buffer readQueryFromClient potential overflow - rioWriteBulkCount used int, although rioWriteBulkString gave it size_t - several places in sds.c that used int for string length or index. - bugfix in RM_SaveAuxField (return was 1 or -1 and not length) - RM_SaveStringBuffer was limitted to 32bit length
* various cleanups and minor fixesOran Agra2016-04-251-2/+3
|
* RDMF: More consistent define names.antirez2015-07-271-5/+5
|
* RDMF: redisAssert -> serverAssert.antirez2015-07-261-1/+1
|
* RDMF (Redis/Disque merge friendlyness) refactoring WIP 1.antirez2015-07-261-1/+1
|
* Translate rio fdset target EWOULDBLOCK error into ETIMEDOUT.antirez2014-10-221-1/+8
| | | | | | | EWOULDBLOCK with the fdset rio target is returned when we try to write but the send timeout socket option triggered an error. Better to translate the error in something the user can actually recognize as a timeout.
* rio.c fdset write() method fixed: wrong type for return value.antirez2014-10-171-1/+1
|
* rio fdset target: handle short writes.antirez2014-10-171-2/+11
| | | | | While the socket is set in blocking mode, we still can get short writes writing to a socket.
* Diskless replication: rio fdset target new supports buffering.antirez2014-10-171-1/+47
| | | | | | | | | | | | | | To perform a socket write() for each RDB rio API write call was extremely unefficient, so now rio has minimal buffering capabilities. Writes are accumulated into a buffer and only when a given limit is reacehd are actually wrote to the N slaves FDs. Trivia: rio lacked support for buffering since our targets were: 1) Memory buffers. 2) C standard I/O. Both were buffered already.
* rio.c fdset target: tolerate (and report) a subset of FDs in error.antirez2014-10-141-2/+20
| | | | | | | | | | | | Fdset target is used when we want to write an RDB file directly to slave's sockets. In this setup as long as there is a single slave that is still receiving our payload, we want to continue sennding instead of aborting. However rio calls should abort of no FD is ok. Also we want the errors reported so that we can signal the parent who is ok and who is broken, so there is a new set integers with the state of each fd. Zero is ok, non-zero is the errno of the failure, if avaialble, or a generic EIO.
* rio.c: draft implementation of fdset target implemented.antirez2014-10-101-0/+60
|
* rio.c refactoring before adding a new target.antirez2014-10-101-17/+24
|
* Use fflush() before fsync() in rio.c.antirez2014-01-221-0/+1
| | | | | | | | | | | Incremental flushing in rio.c is only used to avoid huge kernel buffers synched to slow disks creating big latency spikes, so this fix has no durability implications, however it is certainly more correct to make sure that the FILE buffers are flushed to the kernel before calling fsync on the file descriptor. Thanks to Li Shao Kai for reporting this issue in the Redis mailing list.
* Chunked loading of RDB to prevent redis from stalling reading very large keys.yoav2013-07-161-0/+4
|
* rio.c: added ability to fdatasync() from time to time while writing.antirez2013-04-241-1/+30
|
* Introduced the Build ID in INFO and --version output.antirez2012-11-291-2/+1
| | | | | | | The idea is to be able to identify a build in a unique way, so for instance after a bug report we can recognize that the build is the one of a popular Linux distribution and perform the debugging in the same environment.
* BSD license added to every C source and header file.antirez2012-11-081-3/+36
|
* Fixed compilation of new rio.c changes (typos and so forth.)antirez2012-04-091-1/+3
|
* Add checksum computation to rio.cantirez2012-04-091-0/+10
|
* rio.c file somewhat documented so that the casual reader can understand ↵antirez2012-04-091-0/+18
| | | | what's going on without reading the code.
* Fixed a few warnings compiling on Linux.antirez2011-10-231-0/+2
|
* rioInitWithFile nad rioInitWithBuffer functions now take a rio structure ↵antirez2011-09-221-9/+8
| | | | pointer to avoid copying a structure to return value to the caller.
* make sure to return just 1 for rio.c write when the target is a buffer, as ↵antirez2011-09-221-2/+2
| | | | we do when the target is a file.
* Abstract file/buffer I/O to support in-memory serializationPieter Noordhuis2011-05-131-0/+106