447 Commits

Author SHA1 Message Date
Salvatore Sanfilippo
2af8ebe147 Merge pull request #6149 from madolson/acl-spelling
Fixed some spelling issues in ACL codepath including a user facing error
2019-06-07 22:54:52 +02:00
Madelyn Olson
67a4bcac1b Fixed some spelling issues in ACL codepath including user facing error 2019-06-07 13:25:22 -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
Salvatore Sanfilippo
2395eeb6e0 Merge pull request #6074 from trevor211/fixActiveExpire
Do not active expire keys in the background when the switch is off.
2019-05-10 12:39:35 +02:00
Salvatore Sanfilippo
330835e25a Merge pull request #6077 from zltl/patch-7
delete sdsTest() from REDIS_TEST in server.c to fix build failed
2019-05-10 12:27:47 +02:00
antirez
50b09bc408 Threaded IO: ability to disable reads from threaded path. 2019-05-06 18:02:51 +02:00
antirez
b9b29641cf Threaded IO: read side WIP 3. 2019-05-06 18:02:51 +02:00
antirez
7bae8afef8 Threaded IO: read side WIP. 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
Ubuntu
0353d13321 Threaded IO: stop threads when no longer needed + C11 in Makefile.
Now threads are stopped even when the connections drop immediately to
zero, not allowing the networking code to detect the condition and stop
the threads. serverCron() will handle that.
2019-05-06 18:02:51 +02:00
antirez
df0a28f661 Threaded IO: second attempt without signaling conditions. 2019-05-06 18:02:51 +02:00
antirez
62261aa905 Threaded IO: implement handleClientsWithPendingWritesUsingThreads().
This is just an experiment for now, there are a couple of race
conditions, mostly harmless for the performance gain experiment that
this commit represents so far.

The general idea here is to take Redis single threaded and instead
fan-out on expansive kernel calls: write(2) in this case, but the same
concept could be easily implemented for read(2) and protcol parsing.

However just threading writes like in this commit, is enough to evaluate
if the approach is sounding.
2019-05-06 18:02:51 +02:00
liaotonglang
e374c6eb55 delete sdsTest() from REDIS_TEST
sdsTest() defined in sds.c dit not match the call in server.c.
remove it from REDIS_TEST, since test-sds defined in Makefile.
2019-05-06 19:24:00 +08:00
WuYunlong
0bf3acce38 Do not active expire keys in the background when the switch is off. 2019-05-06 11:46:07 +08:00
Itamar Haber
971d9ee0aa Adds a "Modules" section to INFO
Fixes #6012.

As long as "INFO is broken", this should be adequate IMO. Once we rework
`INFO`, perhaps into RESP3, this implementation should be revisited.
2019-04-16 22:16:12 +03:00
Salvatore Sanfilippo
d415aa89c0 Merge pull request #5944 from yossigo/command-filtering
Command Filtering API
2019-03-22 17:43:49 +01:00
Salvatore Sanfilippo
f87b8c9b52 Merge pull request #5243 from oranagra/sigterm_log
Add log when server dies of SIGTERM during loading
2019-03-21 11:54:09 +01:00
Oran Agra
61501773c9 getKeysFromCommand for TOUCH only extracted the first key.
also, airty for COMMAND command was wrong.
2019-03-20 17:00:39 +02:00
Yossi Gottlieb
bb6e8ba682 Initial command filter experiment. 2019-03-18 13:50:34 +02:00
Itamar Haber
dfc1ea81c6 Fixes BZ[REV]POP's arity 2019-03-03 23:10:45 +02:00
Salvatore Sanfilippo
85b84a045e Merge pull request #5875 from chendq8/partialsync
fix:Slave will do full sync when restart with SHUTDOWN SAVE on cluster mode
2019-03-01 17:29:19 +01:00
Salvatore Sanfilippo
f8322797b2 Merge pull request #3649 from Alkorin/fixTypo
Fix typo (unsupproted => unsupported) in error message
2019-02-27 22:33:22 +01:00
chendianqiang
4cf2552bd3 fix replicationid will not change for server.masterhost==NULL in cluster mode when restart slave 2019-02-27 17:43:05 +08:00
antirez
8b01d81fd4 Merge branch 'gopher' into unstable 2019-02-25 18:16:58 +01:00
antirez
dec44d23d3 ACL: move AUTH implementation in acl.c. 2019-02-25 16:33:38 +01:00
antirez
20c7d1b334 Gopher: config setting to turn support on/off. 2019-02-21 17:28:53 +01:00
Salvatore Sanfilippo
e973611e01 Merge pull request #5836 from soloestoy/fix-acl-warning
ACL: show categories in COMMAND reply
2019-02-13 18:59:59 +01:00
zhaozhao.zz
3eb2f4ca14 ACL: show categories in COMMAND reply
Adding another new filed categories at the end of
command reply, it's easy to read and distinguish
flags and categories, also compatible with old format.
2019-02-14 00:13:01 +08:00
antirez
ddff560cac ACL: tag LASTSAVE as dangerous.
That's not REALLY needed, but... right now with LASTSAVE being the only
command tagged as "admin" but not "dangerous" what happens is that after
rewrites the rewrite engine will produce from the rules:

    user default on +@all ~* -@dangerous nopass

The rewrite:

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

Which is correct but will have users wondering about why LASTSAVE has
something special.

Since LASTSAVE after all also leaks information about the underlying
server configuration, that may not be great for SAAS vendors, let's tag
it as dangerous as well and forget about this issue :-)
2019-02-13 16:30:44 +01:00
antirez
1c15e0ff20 ACL: fix setting of FAST flag. 2019-02-12 17:06:26 +01:00
antirez
46243329d4 ACL: refactor+fix AUTH check in processCommand().
The part that is fixed is that now if the default user is off whatever
is its configuration the user is not considered authenticated.
2019-02-11 16:47:02 +01:00
antirez
87ce87e68c ACL: load ACL file at startup. Prevent silly configurations. 2019-02-07 17:20:03 +01:00
antirez
1bdc63cc01 ACL: implement rewriting of users in redis.conf. 2019-02-05 10:48:17 +01:00
antirez
b67e46953b ACL: load the defined users at server startup. 2019-02-04 16:39:07 +01:00
antirez
c9cdbbad7f ACL: populate category flags from command table. 2019-01-23 16:59:09 +01:00
antirez
460c760e71 ACL: command categories added to the command table. 2019-01-23 12:15:10 +01:00
antirez
28f69e10a4 ACL: improve top comments of the command table. 2019-01-23 11:21:02 +01:00
antirez
ccad1520ff ACL: mark more commands as read-only commands. 2019-01-23 11:14:39 +01:00
antirez
90f6cdeb21 ACL: remove no longer existing flag from comment. 2019-01-22 17:57:20 +01:00
antirez
c23b0fe1d6 ACL: populate command table with new flags. 2019-01-22 17:57:20 +01:00
antirez
bc8625da80 ACL: review of Redis command table and new flags format.
However the code is yet not able to parse the new flags format.
2019-01-22 17:57:20 +01:00
antirez
ee0abae9d2 ACL: specify better the command denied error. 2019-01-22 17:57:20 +01:00
antirez
da54f1fd3f Refactoring: always kill AOF/RDB child via helper functions. 2019-01-21 11:28:44 +01:00
antirez
a5e69e6729 ACL: remove server.requirepass + some refactoring. 2019-01-18 11:49:30 +01:00
antirez
d26ecf2415 ACL: AUTH + no default user password raises an error.
This way the behavior is very similar to the past one.
This is useful in order to remember the user she probably failed to
configure a password correctly.
2019-01-17 18:30:23 +01:00
antirez
d8dc50be2f ACL: change requirepass stop condition to use ACLs. 2019-01-17 18:22:22 +01:00
antirez
9f666e4710 ACL: fix and improve ACL key checking. 2019-01-16 18:31:05 +01:00
antirez
85eabd7baf ACL: fix command exec check by returning. 2019-01-15 18:28:43 +01:00
antirez
7b2a807ba2 ACL: AUTH command new form, using the ACL subsystem. 2019-01-15 13:45:16 +01:00
antirez
efd8fa754f ACL: initial implementation of the ACL command. 2019-01-15 09:36:12 +01:00