328 Commits

Author SHA1 Message Date
Salvatore Sanfilippo
ece91a4bc7 Merge pull request #6265 from madolson/dev-unstable-remove-create-object
Removed unnecessary creation of Redis objects
2019-07-23 17:05:10 +02:00
Madelyn Olson
dedbc9d4d2 Removed unecessary creation of Redis objects 2019-07-22 22:52:16 -07:00
Oran Agra
29754ebe22 diskless replication on slave side (don't store rdb to file), plus some 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
2019-07-08 15:37:48 +03:00
Madelyn Olson
bf7eb02d3e Refactored yesno configs so there was less duplication 2019-06-13 12:18:25 -07:00
Oran Agra
f7833d560d make redis purge jemalloc after flush, and enable background purging thread
jemalloc 5 doesn't immediately release memory back to the OS, instead there's a decaying
mechanism, which doesn't work when there's no traffic (no allocations).
this is most evident if there's no traffic after flushdb, the RSS will remain high.

1) enable jemalloc background purging
2) explicitly purge in flushdb
2019-06-02 15:33:14 +03:00
zhaozhao.zz
4c83175fa4 fix memory leak when rewrite config file 2019-05-07 15:59:16 +08:00
antirez
a83dcf766c Threaded IO: configuration directive for turning on/off reads. 2019-05-06 18:02:51 +02:00
antirez
dc4d13e751 Threaded IO: make num of I/O threads configurable. 2019-05-06 18:02:51 +02:00
Salvatore Sanfilippo
b9ec23e2df Merge pull request #4904 from guybe7/memtoll_fix
Use memtoll() in 'CONFIG SET client-output-buffer-limit'
2019-03-14 11:43:55 +01:00
antirez
20c7d1b334 Gopher: config setting to turn support on/off. 2019-02-21 17:28:53 +01:00
zhaozhao.zz
de0f42bff3 ACL: add masteruser configuration for replication
In mostly production environment, normal user's behavior should be
limited.

Now in redis ACL mechanism we can do it like that:

    user default on +@all ~* -@dangerous nopass
    user admin on +@all ~* >someSeriousPassword

Then the default normal user can not execute dangerous commands like
FLUSHALL/KEYS.

But some admin commands are in dangerous category too like PSYNC,
and the configurations above will forbid replica from sync with master.

Finally I think we could add a new configuration for replication,
it is masteruser option, like this:

    masteruser admin
    masterauth someSeriousPassword

Then replica will try AUTH admin someSeriousPassword and get privilege
to execute PSYNC. If masteruser is NULL, replica would AUTH with only
masterauth like before.
2019-02-12 17:12:37 +08:00
antirez
53318b9e3f ACL: ability to configure an external ACL file. 2019-02-05 17:49:52 +01:00
antirez
1bdc63cc01 ACL: implement rewriting of users in redis.conf. 2019-02-05 10:48:17 +01:00
antirez
7e4b4cd327 ACL: better error reporting in users configuration errors. 2019-02-04 13:04:35 +01:00
antirez
8dce634f5c ACL: make ACLAppendUserForLoading() able to report bad argument. 2019-02-04 13:00:58 +01:00
antirez
73efcef7cb ACL: initial appending of users in user loading list. 2019-02-04 12:55:48 +01:00
zhaozhao.zz
75a55216ba ACL: fix compile warnings 2019-01-21 14:53:46 +08:00
antirez
a5e69e6729 ACL: remove server.requirepass + some refactoring. 2019-01-18 11:49:30 +01:00
antirez
19e9bb2363 ACL: fix config get requirepass. 2019-01-18 11:30:40 +01:00
antirez
5d1069e881 ACL: reimplement requirepass option in term of ACLs. 2019-01-17 18:05:43 +01:00
antirez
dbe9cff831 RESP3: Use new deferred len API in config.c. 2019-01-09 17:00:29 +01:00
antirez
421c242dd0 freeMemoryIfNeeded() small refactoring.
Related to issue #5686 and PR #5689.
2018-12-12 11:37:15 +01:00
antirez
2464cacc55 Fix cluster-replica-no-failover option name.
Thanks to @NicolasLM, see issue #5537.
2018-11-07 12:54:46 +01:00
hujie
f96dbdf0ab fix typo in config.c 2018-10-21 10:37:36 +08:00
antirez
79430d0083 Slave removal: add a few forgotten aliases for CONFIG SET. 2018-09-13 21:43:15 +02:00
antirez
dcdcbcc375 Slave removal: slave -> replica in redis.conf and output buffer option. 2018-09-11 15:32:28 +02:00
antirez
33cfd1a30e 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
39e09ea84c 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
e2c6f9fc60 Make slave-ignore-maxmemory configurable. 2018-08-27 12:27:17 +02:00
antirez
82121055eb Re-apply rebased #2358. 2018-08-27 12:17:14 +02:00
antirez
727382c67c Fix build errors caused by #2358. 2018-08-27 12:15:55 +02:00
Chris Lamb
61132eb183 Merge branch 'unstable' into config-set-maxmemory-grammar 2018-08-25 21:49:29 +02:00
antirez
790afbcbe4 Make dynamic hz actually configurable. 2018-07-30 13:44:52 +02:00
antirez
2f58f65ee8 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
f0a7d56cee Fix config set slowlog-log-slower-than and condition in createLatencyReport 2018-07-13 17:53:55 +08:00
antirez
938d879c2a addReplySubSyntaxError() renamed to addReplySubcommandSyntaxError(). 2018-07-02 18:49:34 +02:00
Salvatore Sanfilippo
c44be0ab9b Merge pull request #4998 from itamarhaber/module_command_help
Module command help
2018-07-02 18:46:56 +02:00
Oran Agra
160802b06f add active defrag support for streams 2018-06-27 15:00:41 +03:00
Salvatore Sanfilippo
138506bac0 Merge pull request #4634 from soloestoy/special-auth
config: handle special configuration "" for auth
2018-06-22 15:48:33 +02:00
Salvatore Sanfilippo
81d1c5fa8a 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
6263f40b76 Merge pull request #4758 from soloestoy/rdb-save-incremental-fsync
Rdb save incremental fsync
2018-06-16 10:59:37 +02:00
shenlongxing
117b5c9739 Fix config_set_numerical_field() integer overflow. 2018-06-13 23:27:53 +08:00
Shen Longxing
0feb81ce49 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
852a6b305e Capitalizes subcommands & orders lexicographically 2018-06-09 21:03:52 +03:00
shenlongxing
c55519ed02 fix integer case error 2018-06-09 22:24:33 +08:00
Itamar Haber
8f2e77dd23 Globally applies addReplySubSyntaxError 2018-06-07 18:39:36 +03:00
antirez
2e894142a8 Streams: make macro node limits configurable. 2018-06-07 14:36:13 +02:00
antirez
9108bbab07 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
Guy Benoish
731fafa3d8 Use memtoll() in 'CONFIG SET client-output-buffer-limit' 2018-04-18 13:01:53 +03:00
Salvatore Sanfilippo
d799fdf733 Merge pull request #4691 from oranagra/active_defrag_v2
Active defrag v2
2018-03-22 09:16:32 +01:00