redict/src
Binbin 03fff10ab4
fsync the old aof file when open a new INCR AOF (#11004)
In rewriteAppendOnlyFileBackground, after flushAppendOnlyFile(1),
and before openNewIncrAofForAppend, we should call redis_fsync
to fsync the aof file.

Because we may open a new INCR AOF in openNewIncrAofForAppend,
in the case of using everysec policy, the old AOF file may not
be fsynced in time (or even at all).

When using everysec, we don't want to pay the disk latency from
the main thread, so we will do a background fsync.

Adding a argument for bioCreateCloseJob, a `need_fsync` flag to
indicate that a fsync is required before the file is closed. So we will
fsync the old AOF file before we close it.

A cleanup, we make union become a union, since the free_* args and
the fd / fsync args are never used together.

Co-authored-by: Oran Agra <oran@redislabs.com>
2022-07-25 09:16:35 +03:00
..
commands fixed complexity of bzmpop and zmpop commands (#11026) 2022-07-24 08:38:04 +03:00
modules use $^ instead of $< for linker in module makefile (#10530) 2022-04-05 17:08:27 +03:00
.gitignore Ignore gcov/lcov artifacts 2012-04-13 17:52:33 -07:00
acl.c Make cluster config file saving atomic and fsync acl (#10924) 2022-07-20 09:11:01 +03:00
adlist.c Free value if dup succeed but listAddNodeTail failed. (#8901) 2021-05-03 13:39:07 +03:00
adlist.h Speedup: unblock clients on keys in O(1). 2020-04-08 12:55:57 +02:00
ae_epoll.c Fail fast when systemic error occurs in poll (#8749) 2021-04-26 15:52:06 +03:00
ae_evport.c Fix cluster bus extensions backwards compatibility (#10206) 2022-01-30 19:43:37 +02:00
ae_kqueue.c Fix the timing of read and write events under kqueue (#9416) 2021-09-02 11:07:51 +03:00
ae_select.c fix unused argument warning in ae_select.c (#10824) 2022-06-07 14:47:09 +03:00
ae.c Add event loop support to the module API (#10001) 2022-01-18 13:10:07 +02:00
ae.h Add event loop support to the module API (#10001) 2022-01-18 13:10:07 +02:00
anet.c Avoid using unsafe C functions (#10932) 2022-07-18 10:56:26 +03:00
anet.h Add socket-mark-id support for marking sockets. (#10349) 2022-04-20 09:29:37 +03:00
aof.c fsync the old aof file when open a new INCR AOF (#11004) 2022-07-25 09:16:35 +03:00
asciilogo.h Changes http to https in texts (#8495) 2021-03-10 19:11:16 +02:00
atomicvar.h Several (mostly Solaris-related) cleanups (#8171) 2020-12-13 17:09:54 +02:00
bio.c fsync the old aof file when open a new INCR AOF (#11004) 2022-07-25 09:16:35 +03:00
bio.h fsync the old aof file when open a new INCR AOF (#11004) 2022-07-25 09:16:35 +03:00
bitops.c Fix typos and limit unknown command error message (#10634) 2022-04-25 17:59:39 +03:00
blocked.c optimize(remove) usage of client's pending_querybuf (#10413) 2022-03-25 10:45:40 +08:00
call_reply.c Fix broken protocol in MISCONF error, RM_Yield bugs, RM_Call(EVAL) OOM check bug, and new RM_Call checks. (#10786) 2022-06-01 13:04:22 +03:00
call_reply.h Add new RM_Call flags for script mode, no writes, and error replies. (#10372) 2022-03-22 14:13:28 +02:00
childinfo.c Implement anetPipe() to combine creating pipe and setting flags (#9511) 2021-10-06 16:08:13 +03:00
cli_common.c Fix error/warning on Arm due to unsigned char. (#10572) 2022-04-12 18:55:11 +03:00
cli_common.h redis-cli: Better --json Unicode support and --quoted-json (#10286) 2022-03-05 21:25:52 +02:00
cluster.c Don't update node ip when peer fd is closed (#10696) 2022-07-20 16:59:27 -07:00
cluster.h Optimize the performance of clusterSendPing for large clusters (#10624) 2022-06-20 21:02:22 -07:00
commands.c fixed complexity of bzmpop and zmpop commands (#11026) 2022-07-24 08:38:04 +03:00
config.c Avoid using unsafe C functions (#10932) 2022-07-18 10:56:26 +03:00
config.h Avoid using unsafe C functions (#10932) 2022-07-18 10:56:26 +03:00
connection.c Don't update node ip when peer fd is closed (#10696) 2022-07-20 16:59:27 -07:00
connection.h Reduce system calls of write for client->reply by introducing writev (#9934) 2022-02-22 14:00:37 +02:00
connhelpers.h Fixed some typos, add a spell check ci and others minor fix (#8890) 2021-06-10 15:39:33 +03:00
crc16_slottable.h Added basic support for clusters to redis-benchmark. 2019-03-01 17:53:14 +01:00
crc16.c RDMF (Redis/Disque merge friendlyness) refactoring WIP 1. 2015-07-26 15:17:18 +02:00
crc64.c Add --large-memory flag for REDIS_TEST to enable tests that consume more than 100mb (#9784) 2021-11-16 08:55:10 +02:00
crc64.h Add --large-memory flag for REDIS_TEST to enable tests that consume more than 100mb (#9784) 2021-11-16 08:55:10 +02:00
crcspeed.c Fixed some typos, add a spell check ci and others minor fix (#8890) 2021-06-10 15:39:33 +03:00
crcspeed.h Added crcspeed library 2020-04-24 17:11:21 -07:00
db.c Fix broken protocol in MISCONF error, RM_Yield bugs, RM_Call(EVAL) OOM check bug, and new RM_Call checks. (#10786) 2022-06-01 13:04:22 +03:00
debug.c crash report instructions (#10816) 2022-06-06 11:39:23 +03:00
debugmacro.h Supplement define guards to prevent multiple inclusion (#10246) 2022-02-06 20:13:34 -08:00
defrag.c fix typos (#10402) 2022-03-09 13:58:23 +02:00
dict.c Avoid using unsafe C functions (#10932) 2022-07-18 10:56:26 +03:00
dict.h Fix possible int overflow when hashing an sds. (#9916) 2021-12-13 21:16:25 +02:00
endianconv.c Avoid using unsafe C functions (#10932) 2022-07-18 10:56:26 +03:00
endianconv.h Add --large-memory flag for REDIS_TEST to enable tests that consume more than 100mb (#9784) 2021-11-16 08:55:10 +02:00
eval.c Expose script flags to processCommand for better handling (#10744) 2022-06-01 14:09:40 +03:00
evict.c Outdated comments, replace COUNTER_INIT_VAL with LFU_INIT_VAL, fix typo (#10888) 2022-06-21 08:14:31 +03:00
expire.c Update the comments of commands introduced or updated in redis 7.0 (#10659) 2022-04-28 08:13:04 +03:00
fmacros.h Fix failed tests on Linux Alpine and add a CI job. (#8532) 2021-02-23 12:57:45 +02:00
function_lua.c Protect any table which is reachable from globals and added globals white list. 2022-04-27 00:37:40 +03:00
functions.c Fix some outdated comments and some typo (#10946) 2022-07-06 20:31:59 -07:00
functions.h Functions: Move library meta data to be part of the library payload. (#10500) 2022-04-05 10:27:24 +03:00
geo.c Fix some nonsense came from LGTM (#9962) 2021-12-19 17:52:23 +02:00
geo.h RDMF (Redis/Disque merge friendlyness) refactoring WIP 1. 2015-07-26 15:17:18 +02:00
geohash_helper.c Fix geo search bounding box check causing missing results (#10018) 2022-02-21 08:06:58 +02:00
geohash_helper.h Delete some unimplemented prototype. (#8882) 2021-04-29 08:25:10 +03:00
geohash.c Fix mistake / outdated doc comment (#10521) 2022-04-04 15:35:49 +03:00
geohash.h Remove duplicate header file include (#10264) 2022-02-08 16:49:47 +02:00
help.h update help.h (#10961) 2022-07-11 12:36:03 +03:00
hyperloglog.c Fix some commands key spec in json files (#10779) 2022-05-27 12:58:00 +03:00
intset.c Add --large-memory flag for REDIS_TEST to enable tests that consume more than 100mb (#9784) 2021-11-16 08:55:10 +02:00
intset.h Add --large-memory flag for REDIS_TEST to enable tests that consume more than 100mb (#9784) 2021-11-16 08:55:10 +02:00
latency.c Add warning for suspected slow system clocksource setting (#10636) 2022-05-22 17:10:31 +03:00
latency.h Add warning for suspected slow system clocksource setting (#10636) 2022-05-22 17:10:31 +03:00
lazyfree.c Redis Function Libraries (#10004) 2022-01-06 13:39:38 +02:00
listpack_malloc.h Optimize listpack for stream usage to avoid repeated reallocs (#6281) 2021-02-16 16:17:38 +02:00
listpack.c Avoid using unsafe C functions (#10932) 2022-07-18 10:56:26 +03:00
listpack.h Optimize integer zset scores in listpack (converting to string and back) (#10486) 2022-04-17 17:16:46 +03:00
localtime.c fix typos (#10402) 2022-03-09 13:58:23 +02:00
lolwut5.c Fixed some typos, add a spell check ci and others minor fix (#8890) 2021-06-10 15:39:33 +03:00
lolwut6.c Fixed some typos, add a spell check ci and others minor fix (#8890) 2021-06-10 15:39:33 +03:00
lolwut.c Fixed some typos, add a spell check ci and others minor fix (#8890) 2021-06-10 15:39:33 +03:00
lolwut.h add include guard for lolwut.h 2020-05-05 23:35:08 -04:00
lzf_c.c Change lzf to handle values larger than UINT32_MAX (#9776) 2021-11-16 13:12:25 +02:00
lzf_d.c Change lzf to handle values larger than UINT32_MAX (#9776) 2021-11-16 13:12:25 +02:00
lzf.h Change lzf to handle values larger than UINT32_MAX (#9776) 2021-11-16 13:12:25 +02:00
lzfP.h Change lzf to handle values larger than UINT32_MAX (#9776) 2021-11-16 13:12:25 +02:00
Makefile Avoid using unsafe C functions (#10932) 2022-07-18 10:56:26 +03:00
memtest.c Add sanitizer support and clean up sanitizer findings (#9601) 2021-11-11 13:51:33 +02:00
mkreleasehdr.sh Update mkreleasehdr.sh 2019-11-19 17:23:47 +08:00
module.c Register abs-expire apis (#11025) 2022-07-24 08:50:21 +03:00
monotonic.c Optimization: Use either monotonic or wall-clock to measure command execution time, to regain up to 4% execution time (#10502) 2022-04-20 14:00:30 +03:00
monotonic.h Optimization: Use either monotonic or wall-clock to measure command execution time, to regain up to 4% execution time (#10502) 2022-04-20 14:00:30 +03:00
mt19937-64.c Fix random element selection for large hash tables. (#8133) 2020-12-23 15:52:07 +02:00
mt19937-64.h Fix random element selection for large hash tables. (#8133) 2020-12-23 15:52:07 +02:00
multi.c Avoid double multiplication of alloc_count (#10934) 2022-07-04 10:09:27 -07:00
networking.c Avoid using unsafe C functions (#10932) 2022-07-18 10:56:26 +03:00
notify.c Add RM_PublishMessageShard (#10543) 2022-04-17 15:43:22 +03:00
object.c Set RM_StringCompare input args as const (#11010) 2022-07-19 08:59:39 +03:00
pqsort.c Fix null pointer subtraction warning (#10498) 2022-04-04 18:38:18 +03:00
pqsort.h BSD license added to every C source and header file. 2012-11-08 18:31:32 +01:00
pubsub.c Account sharded pubsub channels memory consumption (#10925) 2022-07-04 09:18:57 +03:00
quicklist.c fix typo in quicklist.c (#10785) 2022-05-29 08:51:33 +03:00
quicklist.h add comment to 'container' in 'quicklist.h' (#10656) 2022-04-28 08:36:40 +03:00
rand.c Use 'void' for zero-argument functions 2014-08-08 10:05:32 +02:00
rand.h BSD license added to every C source and header file. 2012-11-08 18:31:32 +01:00
rax_malloc.h Cluster: hash slots tracking using a radix tree. 2017-03-27 16:37:22 +02:00
rax.c fix typos (#10402) 2022-03-09 13:58:23 +02:00
rax.h Squash merging 125 typo/grammar/comment/doc PRs (#7773) 2020-09-10 13:43:38 +03:00
rdb.c Avoid using unsafe C functions (#10932) 2022-07-18 10:56:26 +03:00
rdb.h Functions: Move library meta data to be part of the library payload. (#10500) 2022-04-05 10:27:24 +03:00
redis-benchmark.c Add range check for server port in redis-cli/benchmark (#9854) 2022-07-12 20:32:14 -07:00
redis-check-aof.c Fix path copy error and add more logs. (#10324) 2022-02-22 10:09:34 +02:00
redis-check-rdb.c redis-check-rdb add when_opcode check for module aux (#10859) 2022-06-13 18:23:53 +03:00
redis-cli.c Avoid using unsafe C functions (#10932) 2022-07-18 10:56:26 +03:00
redis-trib.rb Redis-trib deprecated: it no longer works and it 2018-07-13 10:51:58 +02:00
redisassert.c Add sanitizer support and clean up sanitizer findings (#9601) 2021-11-11 13:51:33 +02:00
redisassert.h Fix a prototype inconsitency of _serverAssert between redisassert.h and redis.h (#10872) 2022-06-19 08:42:12 +03:00
redismodule.h Set RedisModule_StringCompare input args as const (#10996) 2022-07-17 13:53:48 +03:00
release.c Speedup INFO server section. 2019-10-02 11:30:20 +02:00
replication.c fsync the old aof file when open a new INCR AOF (#11004) 2022-07-25 09:16:35 +03:00
resp_parser.c Unified Lua and modules reply parsing and added RESP3 support to RM_Call (#9202) 2021-08-04 16:28:07 +03:00
resp_parser.h Fix an mistake in comment (#10560) 2022-04-10 09:29:50 +03:00
rio.c Adds isolated netstats for replication. (#10062) 2022-05-31 08:07:33 +03:00
rio.h Adds isolated netstats for replication. (#10062) 2022-05-31 08:07:33 +03:00
script_lua.c remove boolean usage and use 0/1 instead (#10997) 2022-07-17 18:28:38 +03:00
script_lua.h Protect any table which is reachable from globals and added globals white list. 2022-04-27 00:37:40 +03:00
script.c Script that made modification will not break with unexpected NOREPLICAS error (#10855) 2022-06-14 21:09:50 +03:00
script.h Expose script flags to processCommand for better handling (#10744) 2022-06-01 14:09:40 +03:00
sds.c Fix additional AOF filename issues. (#10110) 2022-01-18 12:52:27 +02:00
sds.h Fix additional AOF filename issues. (#10110) 2022-01-18 12:52:27 +02:00
sdsalloc.h Sanitize dump payload: fail RESTORE if memory allocation fails 2020-12-06 14:54:34 +02:00
sentinel.c Update comments on command args, and a misleading error reply (#10645) 2022-05-13 17:55:49 +03:00
server.c Avoid using unsafe C functions (#10932) 2022-07-18 10:56:26 +03:00
server.h Set RM_StringCompare input args as const (#11010) 2022-07-19 08:59:39 +03:00
setcpuaffinity.c cpu affinity: DragonFlyBSD support (#7956) 2020-10-25 14:14:05 +02:00
setproctitle.c Fix failed tests on Linux Alpine and add a CI job. (#8532) 2021-02-23 12:57:45 +02:00
sha1.c Add --large-memory flag for REDIS_TEST to enable tests that consume more than 100mb (#9784) 2021-11-16 08:55:10 +02:00
sha1.h Add --large-memory flag for REDIS_TEST to enable tests that consume more than 100mb (#9784) 2021-11-16 08:55:10 +02:00
sha256.c Add sanitizer support and clean up sanitizer findings (#9601) 2021-11-11 13:51:33 +02:00
sha256.h fix explanation of sha256 (#9220) 2021-07-10 10:04:54 -05:00
siphash.c Add sanitizer support and clean up sanitizer findings (#9601) 2021-11-11 13:51:33 +02:00
slowlog.c slowlog get command supports passing in -1 to get all logs. (#9018) 2021-06-14 16:46:45 +03:00
slowlog.h Auto-generate the command table from JSON files (#9656) 2021-12-15 21:23:15 +02:00
solarisfixes.h Check for __sun macro in solarisfixes.h, not in includers. 2015-01-09 11:23:22 +01:00
sort.c make sort/ro commands validate external keys access patterns (#10106) (#10340) 2022-03-15 17:14:53 +02:00
sparkline.c Squash merging 125 typo/grammar/comment/doc PRs (#7773) 2020-09-10 13:43:38 +03:00
sparkline.h LATENCY GRAPH implemented. 2014-07-02 16:31:22 +02:00
stream.h Add stream consumer group lag tracking and reporting (#9127) 2022-02-23 22:34:58 +02:00
strl.c Avoid using unsafe C functions (#10932) 2022-07-18 10:56:26 +03:00
syncio.c syncWithMaster(): non blocking state machine. 2015-08-06 18:12:20 +02:00
syscheck.c Correctly check for vm.overcommit_memory == 0 (#10841) 2022-06-12 20:53:11 +03:00
syscheck.h Add warning for suspected slow system clocksource setting (#10636) 2022-05-22 17:10:31 +03:00
t_hash.c Fix typo in function name "harndfieldReplyWithListpack" to "hrandfieldReplyWithListpack" (#10623) 2022-04-24 10:21:04 +03:00
t_list.c Update comments on command args, and a misleading error reply (#10645) 2022-05-13 17:55:49 +03:00
t_set.c Update comments on command args, and a misleading error reply (#10645) 2022-05-13 17:55:49 +03:00
t_stream.c Fix heap overflow corruption in XAUTOCLAIM (CVE-2022-31144) (#11002) 2022-07-18 11:36:19 +03:00
t_string.c fix typo in "lcsCommand" doc comment (#10622) 2022-04-24 10:19:46 +03:00
t_zset.c optimize zset conversion on large ZRANGESTORE (#10789) 2022-06-14 21:12:45 +03:00
testhelp.h Add --large-memory flag for REDIS_TEST to enable tests that consume more than 100mb (#9784) 2021-11-16 08:55:10 +02:00
timeout.c Fixes around clients that must be obeyed. Replica report disk errors in PING. (#10603) 2022-04-20 11:11:21 +03:00
tls.c TLS: Notify clients on connection shutdown. (#10931) 2022-07-05 08:41:17 +03:00
tracking.c Sharded pubsub publish messagebulk as smessage (#10792) 2022-05-31 08:03:59 +03:00
util.c Avoid using unsafe C functions (#10932) 2022-07-18 10:56:26 +03:00
util.h Avoid using unsafe C functions (#10932) 2022-07-18 10:56:26 +03:00
valgrind.sup Sanitize dump payload: fuzz tester and fixes for segfaults and leaks it exposed 2020-12-06 14:54:34 +02:00
version.h Add Module API for version and compatibility checks (#7865) 2020-10-11 17:21:58 +03:00
ziplist.c Avoid using unsafe C functions (#10932) 2022-07-18 10:56:26 +03:00
ziplist.h Add --large-memory flag for REDIS_TEST to enable tests that consume more than 100mb (#9784) 2021-11-16 08:55:10 +02:00
zipmap.c Add --large-memory flag for REDIS_TEST to enable tests that consume more than 100mb (#9784) 2021-11-16 08:55:10 +02:00
zipmap.h Add --large-memory flag for REDIS_TEST to enable tests that consume more than 100mb (#9784) 2021-11-16 08:55:10 +02:00
zmalloc.c Avoid using unsafe C functions (#10932) 2022-07-18 10:56:26 +03:00
zmalloc.h Add warning for suspected slow system clocksource setting (#10636) 2022-05-22 17:10:31 +03:00