11906 Commits

Author SHA1 Message Date
John Sully
4bf9beb484 aeDeleteEventLoop use after free and leak fixes
Former-commit-id: 2fd93c5789a4e81455d51b2a4786f708e8d6a2d7
2020-02-16 03:34:25 -05:00
antirez
8c8e4cc7ca Merge branch 'unstable' of github.com:/antirez/redis into unstable 2020-02-14 18:23:13 +01:00
antirez
3b031b1600 Signal key as modified when expired on-access.
This fixes WATCH and client side caching with keys expiring because of
a synchronous access and not because of background expiring.
2020-02-14 18:22:25 +01:00
Salvatore Sanfilippo
21d286c81b Merge pull request #6890 from itamarhaber/patch-trackingGetTotalKeys
Fixes segfault on calling trackingGetTotalKeys
2020-02-14 16:21:24 +01:00
Itamar Haber
53aa39c059 Fixes segfault on calling trackingGetTotalKeys
... with CSC disabled
2020-02-14 17:13:58 +02:00
antirez
50c1288d4f Merge branch 'csc2' into unstable 2020-02-14 14:29:18 +01:00
antirez
0ae05a229a Tracking: first set of tests for the feature. 2020-02-14 14:29:00 +01:00
antirez
8cb485ad3b Tracking: fix operators precedence error in bcast check. 2020-02-14 14:27:45 +01:00
antirez
4597ec9b1c Tracking: fix behavior when switchinig from normal to BCAST. 2020-02-14 14:27:43 +01:00
Salvatore Sanfilippo
948c09c29a Merge pull request #6863 from oranagra/module_commands_no_slowlog
add no-slowlog option to RM_CreateCommand
2020-02-13 17:02:19 +01:00
antirez
c6cf2ed643 Tracking: fix sending messages bug + tracking off bug. 2020-02-13 16:58:07 +01:00
antirez
c98236a5f3 Tracking: BCAST: basic feature now works. 2020-02-12 19:22:04 +01:00
Khem Raj
0545a70d52 Mark extern definition of SDS_NOINIT in sds.h
This helps in avoiding multiple definition of this variable, its also
defined globally in sds.c

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2020-02-12 14:17:54 +01:00
lifubang
5b3a6b5e80 correct help info for --user and --pass
Signed-off-by: lifubang <lifubang@acmcoder.com>
2020-02-12 14:17:54 +01:00
Seunghoon Woo
9edd6808c8 [FIX] revisit CVE-2015-8080 vulnerability 2020-02-12 14:17:54 +01:00
Guy Benoish
05b2e8c5c8 Diskless-load emptyDb-related fixes
1. Call emptyDb even in case of diskless-load: We want modules
   to get the same FLUSHDB event as disk-based replication.
2. Do not fire any module events when flushing the backups array.
3. Delete redundant call to signalFlushedDb (Called from emptyDb).
2020-02-12 14:17:54 +01:00
lifubang
af3ff9d733 fix ssl flag check for redis-cli
Signed-off-by: lifubang <lifubang@acmcoder.com>
2020-02-12 14:17:54 +01:00
Guy Benoish
98a59c540d Exclude "keymiss" notification from NOTIFY_ALL
Because "keymiss" is "special" compared to the rest of
the notifications (Trying not to break existing apps
using the 'A' format for notifications)

Also updated redis.conf and module.c docs
2020-02-12 14:17:54 +01:00
Oran Agra
a1a25bc7f1 update RM_SignalModifiedKey doc comment 2020-02-12 14:17:40 +01:00
Oran Agra
1f9520a75d Add handling of short read of module id in rdb 2020-02-12 14:17:40 +01:00
Yossi Gottlieb
e7e595192a TLS: Update documentation. 2020-02-12 14:17:40 +01:00
Oran Agra
ca22e14d8a A few non-data commands that should be allowed while loading or stale
SELECT, and HELLO are commands that may be executed by the client
as soon as it connects, there's no reason to block them, preventing the
client from doing the rest of his sequence (which might just be INFO or
CONFIG, etc).

MONITOR, DEBUG, SLOWLOG, TIME, LASTSAVE are all non-data accessing
commands, which there's no reason to block.
2020-02-12 14:17:40 +01:00
Oran Agra
da8ec22fc6 Memory leak when bind config is provided twice 2020-02-12 14:17:40 +01:00
Oran Agra
600d02e1a7 fix maxmemory config warning
the warning condition was if usage > limit (saying it'll cause eviction
or oom), but in fact the eviction and oom depends on used minus slave
buffers.

other than fixing the condition, i add info about the current usage and
limit, which may be useful when looking at the log.
2020-02-12 14:17:40 +01:00
Oran Agra
a98e5a1fc3 Fix client flags to be int64 in module.c
currently there's no bug since the flags these functions handle are
always lower than 32bit, but still better fix the type to prevent future
bugs.
2020-02-12 14:17:40 +01:00
Oran Agra
e92983ed3f moduleRDBLoadError, add key name, and use panic rather than exit
using panic rather than exit means you get s stack trace of the code
path that experianced the error, and possibly other info.
2020-02-12 14:17:40 +01:00
Oran Agra
a8e2bbe8f6 stopAppendOnly resets aof_rewrite_scheduled
althouh in theory, users can do BGREWRITEAOF even if aof is disabled, i
suppose it is more common that the scheduled flag is set by either
startAppendOnly, of a failed initial AOFRW fork (AOF_WAIT_REWRITE)
2020-02-12 14:15:56 +01:00
Oran Agra
2af4039b3e reduce repeated calls to use_diskless_load
this function possibly iterates on the module list
2020-02-12 14:15:56 +01:00
Oran Agra
23cbfea39b add SAVE subcommand to ACL HELP and top comment 2020-02-12 14:15:56 +01:00
Oran Agra
5e3b4c978b freeClientAsync don't lock mutex if there's just one thread 2020-02-12 14:15:56 +01:00
Oran Agra
3988bfff50 DEBUG HELP - add PROTOCOL 2020-02-12 14:15:56 +01:00
Oran Agra
ad1c21283e move restartAOFAfterSYNC from replicaofCommand to replicationUnsetMaster
replicationUnsetMaster can be called from other places, not just
replicaofCOmmand, and all of these need to restart AOF
2020-02-12 14:15:56 +01:00
Guy Benoish
084dc68128 Some refactroing using getClientType instead of CLIENT_SLAVE 2020-02-12 14:15:56 +01:00
Guy Benoish
f4c30fd74b Fix small bugs related to replica and monitor ambiguity
1. server.repl_no_slaves_since can be set when a MONITOR client disconnects
2. c->repl_ack_time can be set by a newline from a MONITOR client
3. Improved comments
2020-02-12 14:15:56 +01:00
Yossi Gottlieb
351529cc39 TLS: Some redis.conf clarifications. 2020-02-12 14:15:56 +01:00
Oran Agra
601d423498 config.c verbose error replies for CONFIG SET, like config file parsing
We noticed that the error replies for the generic mechanism for enums
are very verbose for config file parsing, but not for config set
command.

instead of replicating this code, i did a small refactoring to share
code between CONFIG SET and config file parsing.

and also renamed the enum group functions to be consistent with the
naming of other types.
2020-02-12 14:15:56 +01:00
Oran Agra
138252dc56 memoryGetKeys helper function so that ACL can limit access to keys for MEMORY command 2020-02-12 14:15:56 +01:00
antirez
491949ee5b ACL LOG: make max log entries configurable. 2020-02-12 14:15:35 +01:00
antirez
c30fe3a93f ACL LOG: test for AUTH reason. 2020-02-12 14:15:35 +01:00
antirez
c0de265bfa ACL LOG: log failed auth attempts. 2020-02-12 14:15:35 +01:00
antirez
c60351e489 ACL LOG: implement a few basic tests. 2020-02-12 14:15:35 +01:00
antirez
74c4d2f158 ACL LOG: also log ACL errors in the scripting/MULTI ctx. 2020-02-12 14:15:35 +01:00
antirez
3853c71288 ACL LOG: implement LOG RESET. 2020-02-12 14:15:35 +01:00
antirez
7b53636462 ACL LOG: group similar entries in a given time delta. 2020-02-12 14:15:35 +01:00
antirez
9f5b64c4a6 ACL LOG: actually emit entries. 2020-02-12 14:15:35 +01:00
antirez
e6eafd3e1f ACL LOG: implement ACL LOG subcommadn skeleton. 2020-02-12 14:15:35 +01:00
antirez
2d06604451 ACL LOG: data structures and initial functions. 2020-02-12 14:15:35 +01:00
Salvatore Sanfilippo
3fb021696f Merge pull request #6691 from kraj/fno-common
Mark extern definition of SDS_NOINIT in sds.h
2020-02-12 14:04:53 +01:00
Salvatore Sanfilippo
5f1f2bed7d Merge pull request #6882 from lifubang/userpass
correct help info for --user and --pass
2020-02-12 14:04:15 +01:00
lifubang
9ae32c1420 correct help info for --user and --pass
Signed-off-by: lifubang <lifubang@acmcoder.com>
2020-02-12 16:34:22 +08:00