summaryrefslogtreecommitdiff
path: root/src/ae_kqueue.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix the timing of read and write events under kqueue (#9416)sundb2021-09-021-7/+55
| | | | | | | | | | | | | | | | | | | | Normally we execute the read event first and then the write event. When the barrier is set, we will do it reverse. However, under `kqueue`, if an `fd` has both read and write events, reading the event using `kevent` will generate two events, which will result in uncontrolled read and write timing. This also means that the guarantees of AOF `appendfsync` = `always` are not met on MacOS without this fix. The main change to this pr is to cache the events already obtained when reading them, so that if the same `fd` occurs again, only the mask in the cache is updated, rather than a new event is generated. This was exposed by the following test failure on MacOS: ``` *** [err]: AOF fsync always barrier issue in tests/integration/aof.tcl Expected 544 != 544 (context: type eval line 26 cmd {assert {$size1 != $size2}} proc ::test) ```
* Fail fast when systemic error occurs in poll (#8749)Andy Pan2021-04-261-0/+3
| | | | | | | Most of the ae.c backends didn't explicitly handle errors, and instead ignored all errors and did an implicit retry. This is desired for EAGAIN and EINTER, but in case of other systematic errors, we prefer to fail and log the error we got rather than get into a busy loop.
* Use FD_CLOEXEC in Sentinel, so that FDs don't leak to the scripts it runs ↵Andy Pan2021-01-191-0/+1
| | | | | | | | | (#8242) Sentinel uses execve to run scripts, so it needs to use FD_CLOEXEC on all file descriptors, so that they're not accessible by the script it runs. This commit includes a change to the sentinel tests, which verifies no FDs are left opened when the script is executed.
* No more trailing spaces in Redis source code.antirez2014-06-261-6/+6
|
* ae.c event loop: API to resize the fd set size on the run.antirez2013-06-281-1/+7
|
* BSD license added to every C source and header file.antirez2012-11-081-1/+28
|
* Max limit to 10k clients removed, this implements feature request on issue #194antirez2011-12-151-4/+13
|
* Fixed a theoretical memory leak with no practical effects in ae_kqueue.c and ↵antirez2011-12-071-1/+4
| | | | ae_epoll.c, thanks to magicyang87 for reporting it.
* redis.c split into many different C files.antirez2010-07-011-0/+93
networking related stuff moved into networking.c moved more code more work on layout of source code SDS instantaneuos memory saving. By Pieter and Salvatore at VMware ;) cleanly compiling again after the first split, now splitting it in more C files moving more things around... work in progress split replication code splitting more Sets split Hash split replication split even more splitting more splitting minor change