13058 Commits

Author SHA1 Message Date
John Sully
40fdb3ce05 Add endurance testing to better detect threading bugs
Former-commit-id: 945e428aa110968479fdcdfc2d5c5308a99eadc3
2021-05-06 00:09:07 +00:00
VivekSainiEQ
7ff2fb716a Fixed data race? Seems to be passing multithreaded test cases now
Former-commit-id: cb13edd1200c1230fa7e313d69c69e06129951d3
2021-05-05 22:26:36 +00:00
VivekSainiEQ
f6a714db26 Updated overhead calculation to only use repl_backlog_size
Former-commit-id: 6f93c7eb44d84bb143b4ad4fff3c6a5436ebaaf7
2021-05-05 17:04:08 +00:00
VivekSainiEQ
eb35d7e9ec Updated maxmemory tests to account for overhead in new replication backlog behaviour
Former-commit-id: 4cd197959693dfe4d1497c3f703cf6aaa27d34ad
2021-05-05 16:37:02 +00:00
Malavan
9a2d6cbad2 add lookup limit to active subkey expire
Former-commit-id: 5d6da23108401b3b554eaec5d7c78aa0950a28f2
2021-05-04 22:28:03 +00:00
Malavan
6312005640 add lookup limit to active subkey expire
Former-commit-id: b44f504ced6b8259fd5b6553cec932b512e5dfa2
2021-05-04 21:34:25 +00:00
John Sully
8e85eaf53e Merge branch 'keydbpro' into keydbpro_collab
Former-commit-id: 446daf8f4c33005096372ad9e29ae9b3d465c64e
2021-05-03 22:58:56 +00:00
jsully
de6e9845d2 Merge branch 'cluster_bugfix' into 'keydbpro'
Set repl_down_since in freeClientAsync

See merge request keydb-dev/KeyDB-Pro!12

Former-commit-id: bd7591fe50b1e5565da2fa521438b88058d4da07
2021-05-03 21:41:05 +00:00
christian
3d424defd5 Set repl_down_since in freeClientAsync
Former-commit-id: fb4bd2984651837fadd1dbbbb56327e8452b4a2a
2021-05-03 21:41:04 +00:00
John Sully
0c5585e5de Ensure multithread load works with FLASH storage
Former-commit-id: 24e2991c7aa2cef90a89b1640f7095235c5d34ed
2021-05-03 20:18:45 +00:00
Oran Agra
439c356fe6 Redis 6.2.3 2021-05-03 22:57:00 +03:00
Oran Agra
f72cad07e1 Resolve nonsense static analysis warnings
(cherry picked from commit fd7d51c353607f350c865155444bce9236f3d682)
2021-05-03 22:57:00 +03:00
Oran Agra
fe0345931c Fix integer overflow in STRALGO LCS (CVE-2021-29477)
An integer overflow bug in Redis version 6.0 or newer could be exploited using
the STRALGO LCS command to corrupt the heap and potentially result with remote
code execution.

(cherry picked from commit f0c5f920d0f88bd8aa376a2c05af4902789d1ef9)
2021-05-03 22:57:00 +03:00
Oran Agra
832b768248 Fix integer overflow in intset (CVE-2021-29478)
An integer overflow bug in Redis 6.2 could be exploited to corrupt the heap and
potentially result with remote code execution.

The vulnerability involves changing the default set-max-intset-entries
configuration value, creating a large set key that consists of integer values
and using the COPY command to duplicate it.

The integer overflow bug exists in all versions of Redis starting with 2.6,
where it could result with a corrupted RDB or DUMP payload, but not exploited
through COPY (which did not exist before 6.2).

(cherry picked from commit 29900d4e6bccdf3691bedf0ea9a5d84863fa3592)
2021-05-03 22:57:00 +03:00
sundb
23e126a993 Fix memory leak in moduleDefragGlobals (#8853)
(cherry picked from commit 5100ef9f8246dec6590f35f6b9f0b88c2dea0cfb)
2021-05-03 22:57:00 +03:00
Huang Zhw
02bd008bd1 Improve redis-cli help. When help command, we only match command (#8879)
prefix args not all args. So when we help commands with subcommands,
all subcommands will be output.

(cherry picked from commit 0b1b9edb2843730b03f78b6073cdd30873dbba95)
2021-05-03 22:57:00 +03:00
Binbin
0d10460235 redis-benchmark: Add zfree(data) and fix lrange size / text mismatch (#8872)
missing zfree(data) in redis-benchmark.

And also correct the wrong size in lrange.
the text mentioned 500, but size was 450, changed to 500

(cherry picked from commit 1eff8564c78011f7257e485796990a0d4d607a5b)
2021-05-03 22:57:00 +03:00
Binbin
e919deac12 redis-cli: Do not use hostsocket when we got redirected in cluster mode (#8870)
When redis-cli was used with both -c (cluster) and -s (unix socket),
it would have kept trying to use that unix socket, even if it got
redirected by the cluster (resulting in an infinite loop).

(cherry picked from commit 416f2773395ffcd72d8d8408e1558f49d59a0077)
2021-05-03 22:57:00 +03:00
filipe oliveira
ee542fbbd9 redis-benchmark: Error/Warning handling updates. (#8869)
- Immediately exit on errors that are not related to topology updates.
- Deprecates the `-e` option ( retro compatible ) and warns that we now
  exit immediately on errors that are not related to topology updates.
- Fixed wrongfully failing on config fetch error (warning only). This only affects RE.

Bottom line:
- MOVED and ASK errors will not show any warning (unlike the throttled error with `-e` before).
- CLUSTERDOWN still prints an error unconditionally and sleeps for 1 second.
- other errors are fatal.

(cherry picked from commit ef6f902372d4646b1894ec5dbd5f857dea5688d6)
2021-05-03 22:57:00 +03:00
Huang Zhw
9868ad801d Fix potential CONFIG SET bind test failure. (#8875)
Use an invalid IP address to trigger CONFIG SET bind failure, instead of DNS which is not guaranteed to always fail.

(cherry picked from commit 2b22fffc787e91df789dabf23ddcf19ecf34cf6f)
2021-05-03 22:57:00 +03:00
yoav-steinberg
2149c5a030 Bump freebsd-vm version to fix CI failures (#8876)
Specifically we had issues with NTP sync failure which was resolved here: 457af73456

(cherry picked from commit 2e88b0639689a3019e27f55dfa40578847443eeb)
2021-05-03 22:57:00 +03:00
Oran Agra
91c450e80a Prevent replicas from sending commands that interact with keyspace (#8868)
This solves an issue reported in #8712 in which a replica would bypass
the client write pause check and cause an assertion due to executing a
write command during failover.

The fact is that we don't expect replicas to execute any command other
than maybe REPLCONF and PING, etc. but matching against the ADMIN
command flag is insufficient, so instead i just block keyspace access
for now.

(cherry picked from commit 46f4ebbe842620f0976a36741a72482620aa4b48)
2021-05-03 22:57:00 +03:00
Yossi Gottlieb
9d71ac0a6e Remove redundant -latomic on arm64. (#8867)
(cherry picked from commit ebfbb091096b6f36cf82e9f6e6583b10fd5b5acb)
2021-05-03 22:57:00 +03:00
Yang Bodong
ce288cb559 When the password is wrong, redis-benchmark should exit (#8855)
(cherry picked from commit 8423b77f14c0d3a58e580c65a70b4f980f5cdcf6)
2021-05-03 22:57:00 +03:00
Istemi Ekin Akkus
9158a510e1 Modules: Fix RM_GetClusterNodeInfo() to correctly populate the master_id (#8846)
(cherry picked from commit af035c1e1d3bcaf662051cff4dc49f6051321c9c)
2021-05-03 22:57:00 +03:00
zyxwvu Shi
7ac26c3497 Use monotonic clock to check for Lua script timeout. (#8812)
This prevents a case where NTP moves the system clock
forward resulting in a false detection of a busy script.

Signed-off-by: zyxwvu Shi <i@shiyc.cn>
(cherry picked from commit f61c37cec900ba391541f20f7655aad44a26bafc)
2021-05-03 22:57:00 +03:00
Wang Yuan
3b9ceeb2a4 Expire key firstly and then notify keyspace event (#8830)
Modules event subscribers may get wrong things in notifyKeyspaceEvent callback,
such as wrong number of keys, or be able to lookup this key.
This commit changes the order to be like the one in evict.c.

Cleanup:
Since we know the key exists (it expires now), db*Delete is sure to return 1,
so there's no need to check it's output (misleading).

(cherry picked from commit 63acfe4b00b9d3e34a53559f965c0bc44c03db61)
2021-05-03 22:57:00 +03:00
bugwz
d7221e0135 Print the number of abnormal line in AOF (#8823)
When redis-check-aof finds an error, it prints the line number for faster troubleshooting. 

(cherry picked from commit 761d7d27711edfbf737def41ff28f5b325fb16c8)
2021-05-03 22:57:00 +03:00
Huang Zhw
5ce259333e Fix migrateCommand may migrate wrong value. (#8815)
This scene is hard to happen. When first attempt some keys expired,
only kv position is updated not ov. Then socket err happens, second
attempt is taken. This time kv items may be mismatching with ov items.

(cherry picked from commit 080d4579db40d965f8392af5b1da7a99d1a817d5)
2021-05-03 22:57:00 +03:00
Madelyn Olson
3e97074649 Fix memory leak when doing lazyfreeing client tracking table (#8822)
Interior rax pointers were not being freed

(cherry picked from commit c73b4ddfd96d00ed0d0fde17953ce63d78bc3777)
2021-05-03 22:57:00 +03:00
VivekSainiEQ
33a7b52899 Forgot to add server.h in last commit
Former-commit-id: 34fa6119c9a3f1533cc3e6e5d118dc6424a70891
2021-05-03 16:49:09 +00:00
John Sully
c58739bbcb Respect replica output buffer limits when adding large commands to the ring buffer
Former-commit-id: 37ec01cfd8a8da1e895c7cdc358d382d35ad59dd
2021-05-03 16:33:16 +00:00
VivekSainiEQ
f6305ed15b Now tracks memory and resizes 'accurately', need to fix cluster
Former-commit-id: 5f0e01cc199427ab6dfd7f8f28321f6a1f34fd1c
2021-05-03 16:29:11 +00:00
John Sully
eaaff16cca Don't sync too often it hurts perf
Former-commit-id: a20e89a457a0a682483c22f0f1cdb5c93c574d28
2021-05-03 04:15:46 +00:00
John Sully
5583fbb838 Fix remaining test failures
Former-commit-id: 37e607f9b13b6601ff52e74e613fb369cab22b56
2021-05-03 02:37:02 +00:00
John Sully
4677c62428 Fix issue where async load thread misses work
Former-commit-id: a24a7b093295c5f5d69feee9fbc37c64cfa8aa03
2021-04-30 18:48:23 +00:00
John Sully
7352e4a45f Fix majority of test issues with multithread load
Former-commit-id: 4db88176e33e3615ffb90852b49e76b12d5b4622
2021-04-30 18:45:37 +00:00
John Sully
556f394ed9 Initial implementation of multithread load
Former-commit-id: 87b0657c3acd7a3c89964afe1702851b44467c9a
2021-04-30 17:32:54 +00:00
VivekSainiEQ
7ef58a333f Performance optimizations
Former-commit-id: 7fd83d467784d293f7da78b74f9b9763ce387238
2021-04-29 18:51:30 +00:00
VivekSainiEQ
d8367a92b2 Updated resize logic
Former-commit-id: e6d892ef21b7fc6f51433f32b01198038e555419
2021-04-29 17:01:06 +00:00
benschermel
f8ddcf1e8e update README with community slack info
Former-commit-id: 6163e7b13afcdd4f306e1690c400e93dfa904122
2021-04-29 03:11:54 +00:00
christianEQ
861e54942f fixed diagnostic tool to use correct obj files
Former-commit-id: 66547bd28ab025c4d118e6b8d35e2aa0b1f42f10
2021-04-28 16:02:44 +00:00
christianEQ
d1330899a8 updated makefile vars to keydb names
Former-commit-id: e6ab823473f7f215dcd61c3101b7c9ad310a0483
2021-04-27 21:14:05 +00:00
christianEQ
0bf752a543 added keydb-diagnostic-tool binary (copy of benchmark)
Former-commit-id: a2c0bce4cc1403e01e70508b4297cfe5e76643cc
2021-04-27 20:56:37 +00:00
VivekSainiEQ
05fe41b33a Primitive implementation of bypassing client buffer, stats are all messed up and print statements everywhere
Former-commit-id: 8ae310fb0f7b53add826f76891da333b63860001
2021-04-26 22:13:32 +00:00
John Sully
95ae92a691 Optimize freeMemory by lazy freeing objects
Former-commit-id: cca31ed5ee2f42975f0051cfabf1e88720b3d678
2021-04-21 01:20:13 +00:00
John Sully
3966f84862 Better RocksDB perf tuning
Former-commit-id: cbe1e0a7c1b5dc49c1adff07b7c32042e673acf4
2021-04-21 01:19:44 +00:00
John Sully
6e546b3c44 Fix issue where we reply a dangling pointer
Former-commit-id: fd11e490c39fe876d979eace5eaec56c645cdfcf
2021-04-21 01:19:29 +00:00
John Sully
9c1cf39b70 _dictExpandIfNeeded is called too late to be useful
Former-commit-id: 7f75ca5d3a9ed47465bceb22f5f74fd6f0760008
2021-04-21 01:18:38 +00:00
Oran Agra
87c5cf52df Merge 6.2.2 release
Release 6.2.2
2021-04-20 08:03:58 +03:00