264 Commits

Author SHA1 Message Date
antirez
20fa89d093 ACL: better error reporting in users configuration errors. 2019-02-04 13:04:35 +01:00
antirez
0d6e0f8d23 ACL: make ACLAppendUserForLoading() able to report bad argument. 2019-02-04 13:00:58 +01:00
antirez
1327538221 ACL: initial appending of users in user loading list. 2019-02-04 12:55:48 +01:00
zhaozhao.zz
aee528ee66 ACL: fix compile warnings 2019-01-21 14:53:46 +08:00
antirez
4261b70f8d ACL: remove server.requirepass + some refactoring. 2019-01-18 11:49:30 +01:00
antirez
b3087f5d6a ACL: fix config get requirepass. 2019-01-18 11:30:40 +01:00
antirez
03c4aa01ec ACL: reimplement requirepass option in term of ACLs. 2019-01-17 18:05:43 +01:00
antirez
c3d7abb004 RESP3: Use new deferred len API in config.c. 2019-01-09 17:00:29 +01:00
antirez
b166aff1bf freeMemoryIfNeeded() small refactoring.
Related to issue #5686 and PR #5689.
2018-12-12 11:37:15 +01:00
antirez
8abfdc43f1 Fix cluster-replica-no-failover option name.
Thanks to @NicolasLM, see issue #5537.
2018-11-07 12:54:46 +01:00
hujie
cd28b531e8 fix typo in config.c 2018-10-21 10:37:36 +08:00
antirez
7b308a271e Slave removal: add a few forgotten aliases for CONFIG SET. 2018-09-13 21:43:15 +02:00
antirez
8347a21976 Slave removal: slave -> replica in redis.conf and output buffer option. 2018-09-11 15:32:28 +02:00
antirez
6444c30ae2 Slave removal: config.c converted + config rewriting hacks.
Aliases added for all the commands mentioning slave. Moreover CONFIG
REWRITE will use the new names, and will be able to reuse the old lines
mentioning the old options.
2018-09-11 15:32:28 +02:00
antirez
23a5668d8f Use commands (effects) replication by default in scripts.
See issue #5250 and issue #5292 for more info.
2018-09-05 19:33:56 +02:00
antirez
85a2a2ffa3 Make slave-ignore-maxmemory configurable. 2018-08-27 12:27:17 +02:00
antirez
d38934cc1f Re-apply rebased #2358. 2018-08-27 12:17:14 +02:00
antirez
bcd0303571 Fix build errors caused by #2358. 2018-08-27 12:15:55 +02:00
Chris Lamb
31e63f1ce7 Merge branch 'unstable' into config-set-maxmemory-grammar 2018-08-25 21:49:29 +02:00
antirez
8ef8d3f2da Make dynamic hz actually configurable. 2018-07-30 13:44:52 +02:00
antirez
6bfbad38af Dynamic HZ: separate hz from the configured hz.
This way we can remember what the user configured HZ is, but change the
actual HZ dynamically if needed in the dynamic HZ feature
implementation.
2018-07-23 14:13:58 +02:00
WuYunlong
f8c4a65d99 Fix config set slowlog-log-slower-than and condition in createLatencyReport 2018-07-13 17:53:55 +08:00
antirez
9f30306d44 addReplySubSyntaxError() renamed to addReplySubcommandSyntaxError(). 2018-07-02 18:49:34 +02:00
Salvatore Sanfilippo
e7b480369b Merge pull request #4998 from itamarhaber/module_command_help
Module command help
2018-07-02 18:46:56 +02:00
Oran Agra
cfa076f2ee add active defrag support for streams 2018-06-27 15:00:41 +03:00
Salvatore Sanfilippo
fc52e9216e Merge pull request #4634 from soloestoy/special-auth
config: handle special configuration "" for auth
2018-06-22 15:48:33 +02:00
Salvatore Sanfilippo
222d874de4 Merge pull request #5020 from shenlongxing/fix-config
Fix config_set_numerical_field() integer overflow.
2018-06-18 16:02:23 +02:00
Salvatore Sanfilippo
a5c30009e3 Merge pull request #4758 from soloestoy/rdb-save-incremental-fsync
Rdb save incremental fsync
2018-06-16 10:59:37 +02:00
shenlongxing
7a86e8704d Fix config_set_numerical_field() integer overflow. 2018-06-13 23:27:53 +08:00
Shen Longxing
67d2e3d65b fix active-defrag-threshold value error
The active-defrag-threshold-lower/active-defrag-threshold-upper min/max  value in redis.conf should be consistent with 'config set' command.
2018-06-12 17:59:32 +08:00
Itamar Haber
4ef817295e Capitalizes subcommands & orders lexicographically 2018-06-09 21:03:52 +03:00
shenlongxing
6e6c13123e fix integer case error 2018-06-09 22:24:33 +08:00
Itamar Haber
594dc58322 Globally applies addReplySubSyntaxError 2018-06-07 18:39:36 +03:00
antirez
5c7bda3752 Streams: make macro node limits configurable. 2018-06-07 14:36:13 +02:00
antirez
f3db15d2c9 Make active defragmentation tests optional.
They failed when active defrag could not be activated because the
Jemalloc version does not include the additional APIs.
2018-05-24 18:04:21 +02:00
Salvatore Sanfilippo
6e09787828 Merge pull request #4691 from oranagra/active_defrag_v2
Active defrag v2
2018-03-22 09:16:32 +01:00
zhaozhao.zz
4f0e303ff1 rdb: incremental fsync when redis saves rdb 2018-03-16 00:44:50 +08:00
antirez
f467e1fce3 Cluster: ability to prevent slaves from failing over their masters.
This commit, in some parts derived from PR #3041 which is no longer
possible to merge (because the user deleted the original branch),
implements the ability of slaves to have a special configuration
preventing that they try to start a failover when the master is failing.

There are multiple reasons for wanting this, and the feautre was
requested in issue #3021 time ago.

The differences between this patch and the original PR are the
following:

1. The flag is saved/loaded on the nodes configuration.
2. The 'myself' node is now flag-aware, the flag is updated as needed
   when the configuration is changed via CONFIG SET.
3. The flag name uses NOFAILOVER instead of NO_FAILOVER to be consistent
   with existing NOADDR.
4. The redis.conf documentation was rewritten.

Thanks to @deep011 for the original patch.
2018-03-14 14:01:38 +01:00
Oran Agra
eb83a56f8e active defrag v2
- big keys are not defragged in one go from within the dict scan
  instead they are scanned in parts after the main dict hash bucket is done.
- add latency monitor sample for defrag
- change default active-defrag-cycle-min to induce lower latency
- make active defrag start a new scan right away if needed, so it's easier
  (for the test suite) to detect when it's done
- make active defrag quick the current cycle after each db / big key
- defrag  some non key long term global allocations
- some refactoring for smaller functions and more reusable code
- during dict rehashing, one scan iteration of the dict, can end up scanning
  one bucket in the smaller dict and many many buckets in the larger dict.
  so waiting for 16 scan iterations before checking the time, may be much too long.
2018-03-12 15:07:43 +02:00
zhaozhao.zz
59eb641bdf config: handle special configuration "" for auth 2018-01-26 22:49:39 +08:00
antirez
9fc237736e proto-max-querybuf-len -> client-query-buffer-limit.
We already had client buffer limits exported as configuration options.
Stick with the naming scheme already used.

See #4568.
2018-01-11 11:36:26 +01:00
antirez
a3843bfe99 New config options about protocol prefixed with "proto".
Related to #4568.
2018-01-11 11:27:41 +01:00
Oran Agra
f15d20d9c7 Add config options for max-bulk-len and max-querybuf-len mainly to support RESTORE of large keys 2017-12-29 12:43:48 +02:00
antirez
c6243a942d Change indentation and other minor details of PR #4489.
The main change introduced by this commit is pretending that help
arrays are more text than code, thus indenting them at level 0. This
improves readability, and is an old practice when defining arrays of
C strings describing text.

Additionally a few useless return statements are removed, and the HELP
subcommand capitalized when printed to the user.
2017-12-06 12:05:14 +01:00
Itamar Haber
ae758ab46b Merge remote-tracking branch 'upstream/unstable' into help_subcommands 2017-12-05 18:14:59 +02:00
Itamar Haber
fbf582220e Adds help to CONFIG 2017-12-03 19:34:31 +02:00
zhaozhao.zz
44c2e4cdbf LFU: fix the missing of config get and rewrite 2017-11-27 18:38:33 +01:00
WuYunlong
e43fafda62 fix rewrite config: auto-aof-rewrite-min-size 2017-07-15 10:20:56 +08:00
antirez
b49721d57d Use SipHash hash function to mitigate HashDos attempts.
This change attempts to switch to an hash function which mitigates
the effects of the HashDoS attack (denial of service attack trying
to force data structures to worst case behavior) while at the same time
providing Redis with an hash function that does not expect the input
data to be word aligned, a condition no longer true now that sds.c
strings have a varialbe length header.

Note that it is possible sometimes that even using an hash function
for which collisions cannot be generated without knowing the seed,
special implementation details or the exposure of the seed in an
indirect way (for example the ability to add elements to a Set and
check the return in which Redis returns them with SMEMBERS) may
make the attacker's life simpler in the process of trying to guess
the correct seed, however the next step would be to switch to a
log(N) data structure when too many items in a single bucket are
detected: this seems like an overkill in the case of Redis.

SPEED REGRESION TESTS:

In order to verify that switching from MurmurHash to SipHash had
no impact on speed, a set of benchmarks involving fast insertion
of 5 million of keys were performed.

The result shows Redis with SipHash in high pipelining conditions
to be about 4% slower compared to using the previous hash function.
However this could partially be related to the fact that the current
implementation does not attempt to hash whole words at a time but
reads single bytes, in order to have an output which is endian-netural
and at the same time working on systems where unaligned memory accesses
are a problem.

Further X86 specific optimizations should be tested, the function
may easily get at the same level of MurMurHash2 if a few optimizations
are performed.
2017-02-20 17:29:17 +01:00
antirez
eabcf0fed8 Defrag: not enabled by default. Error on CONFIG SET if not available. 2017-01-11 15:43:08 +01:00