redict/src
WuYunlong 0992ada2fe Fix petential cluster link error.
Funcion adjustOpenFilesLimit() has an implicit parameter, which is server.maxclients.
This function aims to ajust maximum file descriptor number according to server.maxclients
by best effort, which is "bestlimit" could be lower than "maxfiles" but greater than "oldlimit".
When we try to increase "maxclients" using CONFIG SET command, we could increase maximum
file descriptor number to a bigger value without calling aeResizeSetSize the same time.
When later more and more clients connect to server, the allocated fd could be bigger and bigger,
and eventually exceeds events size of aeEventLoop.events. When new nodes joins the cluster,
new link is created, together with new fd, but when calling aeCreateFileEvent, we did not
check the return value. In this case, we have a non-null "link" but the associated fd is not
registered.

So when we dynamically set "maxclients" we could reach an inconsistency between maximum file
descriptor number of the process and server.maxclients. And later could cause cluster link and link
fd inconsistency.

While setting "maxclients" dynamically, we consider it as failed when resulting "maxclients" is not
the same as expected. We try to restore back the maximum file descriptor number when we failed to set
"maxclients" to the specified value, so that server.maxclients could act as a guard as before.
2019-12-31 18:16:30 +08:00
..
modules Added some documentation and fixed a test 2019-12-17 07:15:04 +00:00
.gitignore Ignore gcov/lcov artifacts 2012-04-13 17:52:33 -07:00
acl.c Add module APIs for custom authentication 2019-12-17 06:59:59 +00:00
adlist.c adlist: fix listJoin() in the case the second list is empty. 2017-11-28 18:25:14 +01:00
adlist.h Update adlist.h 2019-11-13 10:14:45 +08:00
ae_epoll.c diskless replication rdb transfer uses pipe, and writes to sockets form the parent process. 2019-10-07 21:06:30 +03:00
ae_evport.c ae.c event loop: API to resize the fd set size on the run. 2013-06-28 16:39:49 +02:00
ae_kqueue.c No more trailing spaces in Redis source code. 2014-06-26 18:48:40 +02:00
ae_select.c Include 'fd_set' type name 2016-06-07 16:46:00 -04:00
ae.c Code review minor changes (names, comments). 2019-10-15 17:21:51 +03:00
ae.h Code review minor changes (names, comments). 2019-10-15 17:21:51 +03:00
anet.c TLS: Connections refactoring and TLS support. 2019-10-07 21:06:13 +03:00
anet.h TLS: Connections refactoring and TLS support. 2019-10-07 21:06:13 +03:00
aof.c Merge pull request #6134 from zhouyuan/fix_aof 2019-11-19 11:40:34 +01:00
asciilogo.h BSD license added to every C source and header file. 2012-11-08 18:31:32 +01:00
atomicvar.h several typos fixed, optimize MSETNX to avoid unnecessary loop 2018-10-16 15:48:03 +08:00
bio.c Fix typo in design comment of bio.c. 2018-10-05 18:29:23 +02:00
bio.h macro fix 2019-11-20 20:39:04 -05:00
bitops.c Avoid changing setKey() API after #6679 fix. 2019-12-18 11:58:02 +01:00
blocked.c Stream: Handle streamID-related edge cases 2019-12-26 15:31:37 +05:30
childinfo.c Module API for Forking 2019-07-17 16:40:24 +03:00
cluster.c Add some comment to PR #6144 changes. 2019-12-17 09:19:47 +01:00
cluster.h Split error message so dependandent callers give a useful result 2019-12-16 23:34:37 -08:00
config.c Fix petential cluster link error. 2019-12-31 18:16:30 +08:00
config.h OpenBSD support. 2018-11-25 08:10:26 +00:00
connection.c Code review minor changes (names, comments). 2019-10-15 17:21:51 +03:00
connection.h TLS: Implement support for write barrier. 2019-10-07 21:06:30 +03:00
connhelpers.h Code review minor changes (names, comments). 2019-10-15 17:21:51 +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 Allow all code tests to run using Redis args 2014-12-23 09:31:03 -05:00
crc64.h Allow all code tests to run using Redis args 2014-12-23 09:31:03 -05:00
db.c Avoid changing setKey() API after #6679 fix. 2019-12-18 11:58:02 +01:00
debug.c Modules hooks: complete missing hooks for the initial set of hooks 2019-10-29 17:59:09 +02:00
debugmacro.h Use the standard predefined identifier __func__ (since C99) 2016-08-04 15:12:12 +08:00
defrag.c Adjustments for active defrag defaults and tuning 2019-11-12 15:05:29 +02:00
dict.c Set dictGetFairRandomKey() samples to 20 for final version. 2019-02-19 17:27:42 +01:00
dict.h Better distribution for set get-random-element operations. 2019-02-18 18:27:18 +01:00
endianconv.c Allow all code tests to run using Redis args 2014-12-23 09:31:03 -05:00
endianconv.h Fix typo 2018-07-03 18:19:46 +02:00
evict.c fix issues found by a static analyzer 2019-10-07 09:09:32 +03:00
expire.c Expire cycle: set a buckets limit as well. 2019-11-18 17:47:19 +01:00
fmacros.h Silence _BSD_SOURCE warnings in glibc 2.20 and forward 2014-12-05 12:41:59 +11:00
geo.c Fix GEOHASH negative shifting in a more compatible way. 2019-12-18 12:57:32 +01:00
geo.h RDMF (Redis/Disque merge friendlyness) refactoring WIP 1. 2015-07-26 15:17:18 +02:00
geohash_helper.c Fix GEORADIUS edge case with huge radius. 2017-07-03 19:38:31 +02:00
geohash_helper.h Fix definition of M_PI in geohash_helper.c. 2016-07-06 16:31:11 +02:00
geohash.c Use geohash limit defines in constraint check 2018-09-02 00:06:20 -07:00
geohash.h Multiple GEORADIUS bugs fixed. 2016-07-27 11:34:25 +02:00
gopher.c Gopher: don't add the Lastline. 2019-02-24 21:38:15 +01:00
help.h Update help.h for redis-cli. 2018-10-17 12:57:21 +02:00
hyperloglog.c Fix typo 2019-09-17 06:18:01 +09:00
intset.c several typos fixed, optimize MSETNX to avoid unnecessary loop 2018-10-16 15:48:03 +08:00
intset.h Use const in Redis Module API where possible. 2016-06-20 23:08:06 +03:00
latency.c Module API for LatencyAddSample 2019-10-24 14:24:55 +03:00
latency.h Module API for LatencyAddSample 2019-10-24 14:24:55 +03:00
lazyfree.c refactor dbOverwrite to make lazyfree work 2018-07-31 12:07:57 +08:00
listpack_malloc.h Streams: change listpack allocator to zmalloc. 2017-12-01 10:24:24 +01:00
listpack.c Listpack: optionally force reallocation on inserts. 2018-10-02 19:37:36 +02:00
listpack.h Streams: 12 commits squashed into the initial Streams implementation. 2017-12-01 10:24:24 +01:00
localtime.c update leap year comment when div by 400 2018-09-18 17:04:00 +08:00
lolwut5.c LOLWUT: version 6 initial output. May change a bit. 2019-10-07 18:24:34 +02:00
lolwut6.c LOLWUT 6: always pick a default color sequence. 2019-10-28 11:10:58 +01:00
lolwut.c LOLWUT: version 6 initial output. May change a bit. 2019-10-07 18:24:34 +02:00
lolwut.h LOLWUT: version 6 initial output. May change a bit. 2019-10-07 18:24:34 +02:00
lzf_c.c Upgrade LZF to 3.6 (2011) from 3.5 (2009) 2015-01-02 11:16:10 -05:00
lzf_d.c Try to avoid issues with GCC pragmas and older compilers. 2018-09-28 13:00:44 +02:00
lzf.h No more trailing spaces in Redis source code. 2014-06-26 18:48:40 +02:00
lzfP.h Fix undefined behavior constant defined. 2017-11-19 16:23:42 +00:00
Makefile Merge pull request #6052 from jtru/better-systemd-integration-v2 2019-12-19 08:54:22 +01:00
memtest.c Hopefully better memory test on crash. 2015-12-16 17:41:22 +01:00
mkreleasehdr.sh Update mkreleasehdr.sh 2019-11-19 17:23:47 +08:00
module.c Fix ip and missing mode in RM_GetClusterNodeInfo(). 2019-12-20 12:29:02 +01:00
multi.c Propagation: wrap commands in also_propagate array with MULIT/EXEC 2019-11-22 15:42:49 +08:00
networking.c Fix duplicated CLIENT SETNAME reply. 2019-12-29 15:44:59 +01:00
notify.c added special flag for keyspace miss notifications 2019-03-21 11:47:14 +02:00
object.c Merge branch 'unstable' into rm_get_server_info 2019-11-21 10:06:15 +01:00
pqsort.c No more trailing spaces in Redis source code. 2014-06-26 18:48:40 +02:00
pqsort.h BSD license added to every C source and header file. 2012-11-08 18:31:32 +01:00
pubsub.c RESP3: Pubsub messages in new push format if client is in RESP3 mode. 2019-01-09 17:00:30 +01:00
quicklist.c Fix typo 2018-07-03 18:19:46 +02:00
quicklist.h several typos fixed, optimize MSETNX to avoid unnecessary loop 2018-10-16 15:48:03 +08: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 Rax library updated. 2019-11-14 12:48:54 +01:00
rax.h Rax: radix tree updated to latest version from antirez/rax. 2018-10-13 14:17:38 +02:00
rdb.c Merge pull request #6557 from oranagra/rm_lru_lfu_revized 2019-11-19 11:58:07 +01:00
rdb.h Modules hooks: complete missing hooks for the initial set of hooks 2019-10-29 17:59:09 +02:00
redis-benchmark.c Client side caching: redis-cli ability to enable tracking. 2019-07-22 18:45:47 +02:00
redis-check-aof.c Enlarge error buffer in redis-check-aof.c to remove compiler warning of output truncation through snprintf format string 2019-05-08 12:13:45 +01:00
redis-check-rdb.c Modules hooks: complete missing hooks for the initial set of hooks 2019-10-29 17:59:09 +02:00
redis-cli.c redis-cli: some refactoring about not logging AUTH & co. 2019-12-12 09:40:36 +01:00
redis-trib.rb Redis-trib deprecated: it no longer works and it 2018-07-13 10:51:58 +02:00
redisassert.h Fix typo 2018-07-03 18:19:46 +02:00
redismodule.h Merge pull request #6497 from oranagra/avoid_replica_traffic 2019-12-18 17:06:05 +01:00
release.c Speedup INFO server section. 2019-10-02 11:30:20 +02:00
replication.c Use libsystemd's sd_notify for communicating redis status to systemd 2019-11-19 18:55:44 +02:00
rio.c diskless replication rdb transfer uses pipe, and writes to sockets form the parent process. 2019-10-07 21:06:30 +03:00
rio.h diskless replication rdb transfer uses pipe, and writes to sockets form the parent process. 2019-10-07 21:06:30 +03:00
scripting.c Merge pull request #6615 from soloestoy/wrap-also-propagate-as-multi 2019-12-19 09:24:52 +01:00
sds.c SDS: make sdscatfmt() faster by pre-allocating a bit. 2019-10-02 11:30:20 +02:00
sds.h Merge pull request #3828 from oranagra/sdsnewlen_pr 2018-02-27 04:04:32 -08:00
sdsalloc.h SDS: changes to unify Redis SDS with antirez/sds repo. 2015-07-25 17:25:44 +02:00
sentinel.c Add module APIs for custom authentication 2019-12-17 06:59:59 +00:00
server.c Merge pull request #6615 from soloestoy/wrap-also-propagate-as-multi 2019-12-19 09:24:52 +01:00
server.h Merge pull request #6615 from soloestoy/wrap-also-propagate-as-multi 2019-12-19 09:24:52 +01:00
setproctitle.c DragonFlyBSD little build fix 2018-11-11 18:49:55 +00:00
sha1.c sha1.c: use standard uint32_t. 2015-04-27 12:07:49 +02:00
sha1.h sha1.c: use standard uint32_t. 2015-04-27 12:07:49 +02:00
sha256.c ACL: add slightly modified version of sha256.c for password hashing. 2019-09-12 12:21:37 +02:00
sha256.h ACL: add slightly modified version of sha256.c for password hashing. 2019-09-12 12:21:37 +02:00
siphash.c The aarch64 architecture is support normal memory unaligned accesses, 2019-09-04 12:14:25 +00:00
slowlog.c RESP3: Use new aggregate reply API in slowlog.c. 2019-01-09 17:00:29 +01:00
slowlog.h Added the missed macro definition in slowlog.h 2019-12-02 00:28:41 -05:00
solarisfixes.h Check for __sun macro in solarisfixes.h, not in includers. 2015-01-09 11:23:22 +01:00
sort.c Avoid changing setKey() API after #6679 fix. 2019-12-18 11:58:02 +01:00
sparkline.c RDMF (Redis/Disque merge friendlyness) refactoring WIP 1. 2015-07-26 15:17:18 +02:00
sparkline.h LATENCY GRAPH implemented. 2014-07-02 16:31:22 +02:00
stream.h Stream: Handle streamID-related edge cases 2019-12-26 15:31:37 +05:30
syncio.c syncWithMaster(): non blocking state machine. 2015-08-06 18:12:20 +02:00
t_hash.c Module API for loading and saving long double 2019-11-03 16:42:31 +02:00
t_list.c block: propagate BRPOPLPUSH as RPOPLPUSH when unblock 2019-11-22 16:38:49 +08:00
t_set.c RESP3: fix cases of NULL reported instead of empty aggregate. 2019-09-02 12:50:47 +02:00
t_stream.c Stream: Handle streamID-related edge cases 2019-12-26 15:31:37 +05:30
t_string.c Avoid changing setKey() API after #6679 fix. 2019-12-18 11:58:02 +01:00
t_zset.c RESP3: fix cases of NULL reported instead of empty aggregate. 2019-09-02 12:50:47 +02:00
testhelp.h BSD license added to every C source and header file. 2012-11-08 18:31:32 +01:00
tls.c TLS: Improve CA certifiate configuration options. 2019-10-08 17:58:50 +03:00
tracking.c - memcpy(&id,ri.key,ri.key_len); 2019-12-05 13:37:11 +00:00
util.c Merge branch 'unstable' into rm_get_server_info 2019-11-21 10:06:15 +01:00
util.h Merge branch 'unstable' into rm_get_server_info 2019-11-21 10:06:15 +01:00
valgrind.sup
version.h Mark version of unstable branch in an unique way. 2015-09-29 17:30:24 +02:00
ziplist.c Update ziplist.c 2019-05-08 12:53:56 +08:00
ziplist.h DEBUG: new "ziplist" subcommand added. Dumps a ziplist on stdout. 2016-12-16 09:02:50 +01:00
zipmap.c Allow all code tests to run using Redis args 2014-12-23 09:31:03 -05:00
zipmap.h Allow all code tests to run using Redis args 2014-12-23 09:31:03 -05:00
zmalloc.c Avoid collision with MacOS LIST_HEAD macro after #6384. 2019-12-02 09:13:29 +01:00
zmalloc.h Avoid collision with MacOS LIST_HEAD macro after #6384. 2019-12-02 09:13:29 +01:00