9278 Commits

Author SHA1 Message Date
Guy Benoish
2ecab0b63a Modules: Do not auto-unblock clients if not blocked on keys 2020-02-27 18:02:30 +01:00
Oran Agra
635321d47e fix github actions failing latency test for active defrag - part 2
it seems that running two clients at a time is ok too, resuces action
time from 20 minutes to 10. we'll use this for now, and if one day it
won't be enough we'll have to run just the sensitive tests one by one
separately from the others.

this commit also fixes an issue with the defrag test that appears to be
very rare.
2020-02-27 18:02:30 +01:00
Oran Agra
0b988fa9ec fix github actions failing latency test for active defrag
seems that github actions are slow, using just one client to reduce
false positives.

also adding verbose, testing only on latest ubuntu, and building on
older one.

when doing that, i can reduce the test threshold back to something saner
2020-02-27 18:02:30 +01:00
Oran Agra
60096bc1a1 Fix latency sensitivity of new defrag test
I saw that the new defag test for list was failing in CI recently, so i
reduce it's threshold from 12 to 60.

besides that, i add / improve the latency test for that other two defrag
tests (add a sensitive latency and digest / save checks)

and fix bad usage of debug populate (can't overrides existing keys).
this was the original intention, which creates higher fragmentation.
2020-02-27 18:02:30 +01:00
antirez
b439542604 Tracking: optin/out implemented. 2020-02-27 18:02:30 +01:00
antirez
ef3551d149 Test engine: experimental change to avoid busy port problems. 2020-02-27 18:02:30 +01:00
antirez
72c053519c Test engine: detect timeout when checking for Redis startup. 2020-02-27 18:02:30 +01:00
antirez
294c9af469 Test engine: better tracking of what workers are doing. 2020-02-27 18:00:47 +01:00
hwware
ba0270799e add missing subcommand description for debug oom 2020-02-27 18:00:47 +01:00
Guy Benoish
5d0890c0a8 Fix memory leak in test_ld_conv 2020-02-27 18:00:47 +01:00
Madelyn Olson
d1f22eaca4 Give an error message if you specify redirect twice 2020-02-27 18:00:47 +01:00
Madelyn Olson
762fbcb687 Minor CSC fixes and fixed documentation 2020-02-27 18:00:47 +01:00
Oran Agra
349aa24511 Defrag big lists in portions to avoid latency and freeze
When active defrag kicks in and finds a big list, it will create a bookmark to
a node so that it is able to resume iteration from that node later.

The quicklist manages that bookmark, and updates it in case that node is deleted.

This will increase memory usage only on lists of over 1000 (see
active-defrag-max-scan-fields) quicklist nodes (1000 ziplists, not 1000 items)
by 16 bytes.

In 32 bit build, this change reduces the maximum effective config of
list-compress-depth and list-max-ziplist-size (from 32767 to 8191)
2020-02-27 18:00:47 +01:00
Guy Benoish
b4ddc7b7ba XGROUP DESTROY should unblock XREADGROUP with -NOGROUP 2020-02-27 18:00:47 +01:00
hayashier
73806f74ca fix typo from fss to rss 2020-02-27 18:00:47 +01:00
antirez
b6129f86c1 Test is more complex now, increase default timeout. 2020-02-27 18:00:47 +01:00
antirez
f15fb727a0 Tracking: fix max-keys configuration directive. 2020-02-27 18:00:46 +01:00
Itamar Haber
e374573f30 Fixes segfault on calling trackingGetTotalKeys
... with CSC disabled
2020-02-27 18:00:46 +01:00
antirez
73d47d5749 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-27 18:00:46 +01:00
antirez
b7cb28d501 Tracking: first set of tests for the feature. 2020-02-27 18:00:46 +01:00
antirez
1db7257107 Tracking: fix operators precedence error in bcast check. 2020-02-27 17:59:57 +01:00
antirez
fe96e29d5f Tracking: fix behavior when switchinig from normal to BCAST. 2020-02-27 17:59:57 +01:00
antirez
f21be1ec55 Tracking: fix sending messages bug + tracking off bug. 2020-02-27 17:59:57 +01:00
antirez
6fb1aa2381 Tracking: BCAST: basic feature now works. 2020-02-27 17:59:57 +01:00
antirez
d4fe79a174 Tracking: BCAST: broadcasting of keys in prefixes implemented. 2020-02-27 17:59:57 +01:00
antirez
abb81c6351 Tracking: BCAST: registration in the prefix table. 2020-02-27 17:59:57 +01:00
antirez
77da960815 Tracking: BCAST: parsing of the options + skeleton. 2020-02-27 17:59:57 +01:00
antirez
3e8c69a9de Tracking: always reply with an array of keys. 2020-02-27 17:59:57 +01:00
antirez
a788c373e6 Tracking: minor change of names and new INFO field. 2020-02-27 17:59:57 +01:00
antirez
df83892760 Rax.c: populate data field after random walk. 2020-02-27 17:59:57 +01:00
antirez
0517da3618 Tracking: rename INFO field with total items. 2020-02-27 17:59:57 +01:00
antirez
3c16d6b32d Tracking: first conversion from hashing to key names. 2020-02-27 17:59:57 +01:00
Oran Agra
3b4f147775 add no-slowlog option to RM_CreateCommand 2020-02-27 17:59:57 +01:00
Khem Raj
5e762d847c 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
54f5499aee correct help info for --user and --pass
Signed-off-by: lifubang <lifubang@acmcoder.com>
2020-02-12 14:17:54 +01:00
Seunghoon Woo
0c952b13d0 [FIX] revisit CVE-2015-8080 vulnerability 2020-02-12 14:17:54 +01:00
Guy Benoish
dd34f70368 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
5e042dbc05 fix ssl flag check for redis-cli
Signed-off-by: lifubang <lifubang@acmcoder.com>
2020-02-12 14:17:54 +01:00
Guy Benoish
dcbe8bfad1 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
36caf2e42b update RM_SignalModifiedKey doc comment 2020-02-12 14:17:40 +01:00
Oran Agra
3067352a8d Add handling of short read of module id in rdb 2020-02-12 14:17:40 +01:00
Yossi Gottlieb
9baaf858f9 TLS: Update documentation. 2020-02-12 14:17:40 +01:00
Oran Agra
4440133e9a 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
c957794144 Memory leak when bind config is provided twice 2020-02-12 14:17:40 +01:00
Oran Agra
1333a46b7e 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
8e7282eb3e 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
a678390e52 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
919fbf421d 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
22e45d46fe freeClientAsync don't lock mutex if there's just one thread 2020-02-12 14:15:56 +01:00
Oran Agra
ba28924418 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