11882 Commits

Author SHA1 Message Date
John Sully
18b8a83ecb During RDB load we can only handle clients on the main thread as our workers are not yet created. This change also unifies the accept logic across the socket types
Former-commit-id: 59cda9cfb96eca55c4b445309970bd95277ebc5c
2020-05-23 16:03:24 -04:00
John Sully
5d9afccfdd Diskless replication handler needs to run on the main thread
Former-commit-id: 091af6400348b7716f7fe0bc845bf7f16d922815
2020-05-23 15:15:42 -04:00
ShooterIT
23b4dc503a Fix reply bytes calculation error
Fix #7275.


Former-commit-id: a12210c87561fed5522c9a6e8db6d8606cabe3bf
2020-05-23 13:02:55 -04:00
John Sully
db7f0572a3 Merge tag '6.0.3' into unstable
Redis 6.0.3


Former-commit-id: 43649fc5b4425fb05e2c1aa48da7c07bc83ce24d
2020-05-22 16:53:10 -04:00
John Sully
7e53a312ce Merge branch 'unstable' of https://github.com/JohnSully/KeyDB into unstable
Former-commit-id: 01cc25653ab7d797f6a466f18d540517d5003f5f
2020-05-22 16:45:27 -04:00
John Sully
2d783a3cbf Merge tag '6.0.2' into unstable
Redis 6.0.2


Former-commit-id: a010e4a4b2cc2bcad1cb14604b7ebc596c35b05e
2020-05-22 16:45:18 -04:00
John Sully
67b7d512cb Merge commit 'cb683a84f7a9d530bec629f2b656e7d0842a0f75' into unstable
Former-commit-id: 817a11ff110772893eda0675912bbb0cfc1fca74
2020-05-22 15:56:35 -04:00
John Sully
df7ac419d0 Merge commit '3a441c7d95c8757d2ab12ff730cc7ca8899538c9' into unstable
Former-commit-id: c52e1fc78c369843e49a22765bed2c53e99d9709
2020-05-22 15:42:50 -04:00
John Sully
1eeb5de69f Merge commit 'c57d9146f41f4b661d9d2cb48b83b3abc757ba0e' into unstable
Former-commit-id: d74871da40dea11bd1a226fbecb0974ff5f8ec8c
2020-05-22 15:36:44 -04:00
John Sully
bc1f7d6d45 Update README.md
Former-commit-id: a25cf15ecd6e7a013f4b653b3b103c9e9227af3a
2020-05-22 14:03:29 -04:00
Madelyn Olson
e201f83cee EAGAIN for tls during diskless load 2020-05-22 12:37:59 +02:00
Qu Chen
58fc456cbd Disconnect chained replicas when the replica performs PSYNC with the master always to avoid replication offset mismatch between master and chained replicas. 2020-05-22 12:37:59 +02:00
hwware
3febc5c29e using moreargs variable 2020-05-22 12:37:59 +02:00
hwware
8d67385593 fix server crash for STRALGO command 2020-05-22 12:37:49 +02:00
ShooterIT
7a35eec540 Replace addDeferredMultiBulkLength with addReplyDeferredLen in comment 2020-05-22 12:37:49 +02:00
Yossi Gottlieb
f93e1417b9 TLS: Improve tls-protocols clarity in redis.conf. 2020-05-22 12:37:49 +02:00
ShooterIT
d0c9e44545 Fix reply bytes calculation error
Fix #7275.
2020-05-22 12:37:49 +02:00
zhaozhao.zz
1cde6a0603 Tracking: flag CLIENT_TRACKING_BROKEN_REDIR when redir broken 2020-05-22 12:37:49 +02:00
Oran Agra
436be34986 fix a rare active defrag edge case bug leading to stagnation
There's a rare case which leads to stagnation in the defragger, causing
it to keep scanning the keyspace and do nothing (not moving any
allocation), this happens when all the allocator slabs of a certain bin
have the same % utilization, but the slab from which new allocations are
made have a lower utilization.

this commit fixes it by removing the current slab from the overall
average utilization of the bin, and also eliminate any precision loss in
the utilization calculation and move the decision about the defrag to
reside inside jemalloc.

and also add a test that consistently reproduce this issue.
2020-05-22 12:37:49 +02:00
Oran Agra
f9d2ffdc5d improve DEBUG MALLCTL to be able to write to write only fields.
also support:
  debug mallctl-str thread.tcache.flush VOID
2020-05-22 12:37:49 +02:00
hujie
d7968ee920 fix clear USER_FLAG_ALLCOMMANDS flag in acl
in ACLSetUserCommandBit, when the command bit overflows, no operation
is performed, so no need clear the USER_FLAG_ALLCOMMANDS flag.

in ACLSetUser, when adding subcommand, we don't need to call
ACLGetCommandID ahead since subcommand may be empty.
2020-05-22 12:37:49 +02:00
ShooterIT
a902e6b251 Redis Benchmark: generate random test data
The function of generating random data is designed by antirez. See #7196.
2020-05-22 12:37:49 +02:00
hwware
9564ed7c39 Redis-Benchmark: avoid potentical memmory leaking 2020-05-22 12:37:49 +02:00
WuYunlong
2e41827435 Handle keys with hash tag when computing hash slot using tcl cluster client. 2020-05-22 12:37:49 +02:00
WuYunlong
eb2c8b2c61 Add a test to prove current tcl cluster client can not handle keys with hash tag. 2020-05-22 12:37:49 +02:00
ShooterIT
928e6976bb Use dictSize to get the size of dict in dict.c 2020-05-22 12:37:49 +02:00
Madelyn Olson
cdcf5af5aa Converge hash validation for adding and removing 2020-05-22 12:37:49 +02:00
Benjamin Sergeant
e8b09d2203 do not handle --cluster-yes for cluster fix mode 2020-05-22 12:37:49 +02:00
Benjamin Sergeant
57b4fb0d84 fix typo ... 2020-05-22 12:37:49 +02:00
Benjamin Sergeant
29f25e4111 Redis-cli 6.0.1 --cluster-yes doesn't work (fix #7246)
This make it so that all prompts for all redis-cli --cluster commands are automatically answered with a yes.
2020-05-22 12:37:49 +02:00
Oran Agra
00d8b92b89 fix valgrind test failure in replication test
in b4416280c i added more keys to that test to make it run longer
but in valgrind this now means the test times out, give valgrind more
time.
2020-05-22 12:37:49 +02:00
Oran Agra
5e17e6276c add regression test for the race in #7205
with the original version of 6.0.0, this test detects an excessive full
sync.
with the fix in 1a7cd2c0e, this test detects memory corruption,
especially when using libc allocator with or without valgrind.
2020-05-22 12:37:49 +02:00
antirez
96e7c011e2 Improve the PSYNC2 test reliability. 2020-05-22 12:37:49 +02:00
John Sully
8f8dea57db Merge tag '6.0.1' into unstable
Redis 6.0.1.


Former-commit-id: c505df8830123904da026be2aacbd92a95a5e37c
2020-05-21 23:41:36 -04:00
John Sully
08a2facf13 Missing noexcept
Former-commit-id: f214ada545f810f8a9095753984b75c438cd6464
2020-05-21 23:25:50 -04:00
John Sully
8a14bb4b10 build failure on macos
Former-commit-id: c10aa3b8b0811da9931745695c5de06fdfa99fe3
2020-05-21 23:24:34 -04:00
John Sully
27eb239f1a Fix bad merge in CI.yml
Former-commit-id: 6311d709c39b3bacaeab77b18033010f1b548f81
2020-05-21 22:09:06 -04:00
John Sully
ad1eac9856 Merge commit 'bec68bff2978de88b23140f41b6a943162333b11' into unstable
Former-commit-id: 8ab77465dbb3c0b1f859f24cdbb461937516eb6a
2020-05-21 19:37:42 -04:00
John Sully
48058188a8 Merge commit '414debfd04d21c0b19d5f6bb5249398d83670f3d' into unstable
Former-commit-id: 201bf73ef772914c56ac680bb9c7fb6a98b218b2
2020-05-21 18:57:28 -04:00
John Sully
3384af024d Merge commit 'cbcd07777dc569618a34f59e5fd0de53178f4f1d' into unstable
Former-commit-id: 49784c8122e827bd9de86bbae4d88c313400e86e
2020-05-21 18:48:49 -04:00
John Sully
3324d4dc0f Merge commit '5719b3054a534e62c25ae97680ecd4f7238ba484' into unstable
Former-commit-id: 3e03f308b564cd94f4a6407c80792d080e0f83c5
2020-05-21 17:55:09 -04:00
John Sully
b6500a08dc Merge commit '026cc11b056f063631d990f1a9db45b4e583974e' into unstable
Former-commit-id: 95cecb0229af0278cf614ffd746ba829ae7c897c
2020-05-21 17:45:15 -04:00
John Sully
c4db71f971 Merge commit '024c380b9da02bc4112822c0f5f9ac1388b4205b' into unstable
Former-commit-id: 7676f5b15f24a044257250b8891d23b14642da48
2020-05-21 17:36:53 -04:00
John Sully
24322b9b6d Merge commit 'eba28e2cea0b2632cf751426ada02adf24f273db' into unstable
Former-commit-id: d5b057534a3dbf50f94465332107da2490811946
2020-05-21 17:32:53 -04:00
John Sully
ba7483c20b Merge commit 'c35a53169ffdbdf73f91224b6e62f6129fb9a838' into unstable
Former-commit-id: 7a15f6dfc7331d6759201137971e7c2965672be8
2020-05-21 17:30:56 -04:00
John Sully
50fb85a489 Override missing new, fix new/delete mismatch
Former-commit-id: 712d825c233c3ebbc49b22b8c1865916ca9dc3bc
2020-05-20 15:57:08 -04:00
antirez
7803b1148d Redis 6.0.3. 2020-05-16 18:11:58 +02:00
antirez
1eab62f7e5 Remove the client from CLOSE_ASAP list before caching the master.
This was broken in 1a7cd2c: we identified a crash in the CI, what
was happening before the fix should be like that:

1. The client gets in the async free list.
2. However freeClient() gets called again against the same client
   which is a master.
3. The client arrived in freeClient() with the CLOSE_ASAP flag set.
4. The master gets cached, but NOT removed from the CLOSE_ASAP linked
   list.
5. The master client that was cached was immediately removed since it
   was still in the list.
6. Redis accessed a freed cached master.

This is how the crash looked like:

=== REDIS BUG REPORT START: Cut & paste starting from here ===
1092:S 16 May 2020 11:44:09.731 # Redis 999.999.999 crashed by signal: 11
1092:S 16 May 2020 11:44:09.731 # Crashed running the instruction at: 0x447e18
1092:S 16 May 2020 11:44:09.731 # Accessing address: 0xffffffffffffffff
1092:S 16 May 2020 11:44:09.731 # Failed assertion:  (:0)

------ STACK TRACE ------
EIP:
src/redis-server 127.0.0.1:21300(readQueryFromClient+0x48)[0x447e18]

And the 0xffff address access likely comes from accessing an SDS that is
set to NULL (we go -1 offset to read the header).
2020-05-16 18:04:17 +02:00
antirez
ae306a3df6 Redis 6.0.2. 2020-05-15 22:29:52 +02:00
Yossi Gottlieb
16ba33c05b TLS: Fix test failures on recent Debian/Ubuntu.
Seems like on some systems choosing specific TLS v1/v1.1 versions no
longer works as expected. Test is reduced for v1.2 now which is still
good enough to test the mechansim, and matters most anyway.
2020-05-15 22:23:24 +02:00