10815 Commits

Author SHA1 Message Date
John Sully
68ed1292ee Fix test failure caused by allowing pings during load
Former-commit-id: 569a3d9ff86f4cd74e269391ce1d582e009147ce
2021-01-31 07:15:55 +00:00
John Sully
10a745df65 Reduce intermittent failures by giving tests more time
Former-commit-id: 69bc7108bd552b18e5cf4ab6ea354ad5cd1e93e9
2021-01-31 06:33:13 +00:00
christianEQ
a0ae32a9f0 added exception to allow pings during loading
Former-commit-id: 8a557e9d711c3aadbc566cf96ca2a18f10e8d5a4
2021-01-31 00:12:49 -05:00
christianEQ
19dc63bd3a added severity levels for afterErrorReply
Former-commit-id: fe0f07199353abf6668cd66cd2e21751db5c21d9
2021-01-31 00:12:49 -05:00
John Sully
d4408580b5 Improve multithreaded test reliability
Former-commit-id: effa53339cf272ced8f0661bc275628f87be5c73
2021-01-31 04:33:27 +00:00
John Sully
7766b37062 Fix test failure due to bad merge
Former-commit-id: f6fb0e462001c49af185682caed8881ccd6d36f3
2021-01-31 03:40:57 +00:00
John Sully
516eee7a1a Fix CI failure due to missing package
Former-commit-id: cf46a014c112bbba0d147dbc8489e3054df9a1ef
2021-01-31 02:36:30 +00:00
John Sully
543d92d0ff Fix crash on shutdown command
Former-commit-id: d72b5fa16df0c41dd62b8b6d25c1c2c9cce8b413
2021-01-31 02:30:28 +00:00
christianEQ
7d3b48fc33 Merge pull request #284 from christianEQ/redismerge_2021-01-20
Merge Redis 6.0.10 into KeyDB

Former-commit-id: 0151507cef9b5d0760665aeccbcab9c1296ee764
2021-01-29 10:59:36 -05:00
christianEQ
5a6f7c395f killMainThread -> killServerThreads
Former-commit-id: 0fea781f8f0218c5475890a395c49bd7e4faa03f
2021-01-28 23:57:19 +00:00
christianEQ
3d2a59d7ae compare_exchange in connSocketRead, explicitly enforce memory order (even if redundant)
Former-commit-id: 3c4cadc020c5aa9c39a066679255b8d2520c8e22
2021-01-28 23:17:48 +00:00
christianEQ
9d62e397bd fixed replicaof no one config, added test case
Former-commit-id: e2615ccf88ddb2a93536b62318983780890c4819
2021-01-28 19:49:22 +00:00
christianEQ
304a037cb3 updated version num to 255.255.255
Former-commit-id: 595deb0e1391c29c4766072bdd292202dd55c79d
2021-01-28 16:54:22 +00:00
christianEQ
3949e90920 Merge remote-tracking branch 'john/unstable' into redismerge_2021-01-20
Former-commit-id: 5372d1aab2174d23e91cbbec4e62925452fa2bda
2021-01-27 22:25:14 +00:00
christianEQ
70960ffe12 arm locker before checking zmalloc_used_memory
Former-commit-id: 52eca14ca61a54ac7dde57c2966216cab0e7ae2f
2021-01-27 22:24:06 +00:00
Daniel Dai
6ffb95a313 Fix Swapdb crash
Former-commit-id: 1155f5ac6345591fb40a3ce77f81e11485a521dd
2021-01-27 15:24:10 -05:00
christianEQ
5668a5d02d fixed uninitialized variables in ACLSetUserCommandBit
Former-commit-id: 7319953ae389817679ce74c44b8baa631a4eafab
2021-01-26 23:29:15 +00:00
christianEQ
b840a1a3eb fixed strncpy off-by-one errors
Former-commit-id: b8e106a72e71bf5d8abd7d6032ff950f9722db59
2021-01-26 23:27:28 +00:00
christianEQ
59ffc79765 removed unimplemented killIOThreads function declaration
Former-commit-id: f30f8eba2f0a5cb247478c2104a4f748659a6cf2
2021-01-26 22:27:22 +00:00
christianEQ
8d7142488b fixed server.cpp mentions
Former-commit-id: 7ed2296fc5d10a1c41020558b4bc445953531bdd
2021-01-26 22:22:19 +00:00
christianEQ
0312d89c7a added note about io-threads to keydb.conf
Former-commit-id: 0691a46669d6fbd7dd4a1962c7b1c1929c089b11
2021-01-26 22:10:53 +00:00
christianEQ
237f3e8524 fixed race condition in connSocketWrite
Former-commit-id: d7f01c1f7d1bb2d6e0b004f532f7b98ed968d389
2021-01-26 22:08:07 +00:00
christianEQ
1907c4f6f8 Removed Redis-specific things from conf file
Former-commit-id: 4d71929c6000b6a5ceb4793f9b3ee8c7576f4b71
2021-01-26 21:50:45 +00:00
christianEQ
c068f2cd3d Merge tag 'tags/6.0.10' into redismerge_2021-01-20
Former-commit-id: dadce055f897cee83946c2d3e5cbb76341b94230
2021-01-26 21:43:09 +00:00
christianEQ
ab80e23152 changed loading process config types to be consistent across environments
Former-commit-id: d2867580aba70bbfa703578cdb40093a4e1a7147
2021-01-14 21:12:36 -05:00
christianEQ
464a08226d renamed loaded key counter to be more clear
Former-commit-id: 8dc238efae8f6ba6b4ddc9b169e7195bcb43920b
2021-01-14 13:06:57 -05:00
christianEQ
81f4f73c30 removed 'comment arguments' from config options (doesn't ignore inline comments)
Former-commit-id: 7cd4b5e11c9c92e88cb551f7d83efc668aa259c7
2021-01-14 13:06:57 -05:00
christianEQ
047e1174d9 fixed signedness warning
Former-commit-id: 00043f95099803f6b06a208ac3b19e2cef9abf4d
2021-01-14 13:06:57 -05:00
christianEQ
9262739be2 added section to keydb.conf for new options, tweaked default
Former-commit-id: 9b81f3f263de8cffab20ef4d20c2ac4935f63a10
2021-01-14 13:06:57 -05:00
christianEQ
327c44f8eb ping replicas during key load
Former-commit-id: 2747d1a1a99d3415d5486a472fe0e39135b79bc5
2021-01-14 13:06:57 -05:00
christianEQ
28a0cdc572 added config option for loading callback interval keys
Former-commit-id: 9f7ed0b2327924563668105ead09f52833902d0b
2021-01-14 13:06:57 -05:00
christianEQ
fc3388acfe configurized loading_process_events_interval_bytes
Former-commit-id: c176ea73664a182af9caacda9d489fb2b344b2de
2021-01-14 13:06:57 -05:00
Oran Agra
93fbd5d13e Redis 6.0.10 2021-01-12 16:25:37 +02:00
Oran Agra
463b97dacb Improve stability of new CSC eviction test (#8160)
b640e2944 added a test that now fails with valgrind
it fails for two resons:
1) the test samples the used memory and then limits the maxmemory to
   that value, but it turns out this is not atomic and on slow machines
   the background cron process that clean out old query buffers reduces
   the memory so that the setting doesn't cause eviction.
2) the dbsize was tested late, after reading some invalidation messages
   by that time more and more keys got evicted, partially draining the
   db. this is not the focus of this fix (still a known limitation)

(cherry picked from commit 080ad5b0f297bc91f38cf49a7ff25605f4fcbe64)
2021-01-12 16:25:37 +02:00
Oran Agra
61640e5ba0 fix race in cluster transactions test (#8312)
we didn't wait for the commands executed on the master to reach the replica.

(cherry picked from commit 7d23490bd794078fa647bd055d70b02853e07ca8)
2021-01-12 16:25:37 +02:00
Oran Agra
2be8879c06 Fix cluster diskless load swapdb test (#8308)
The test was trying to wait for the replica to start loading the rdb
from the master before it kills the master, but it was actually waiting
for ROLE to be in "sync" mode, which corresponds to REPL_STATE_TRANSFER
that starts before the actual loading starts.
now instead it waits for the loading flag to be set.

Besides, the test was dependent on the previous configuration of the
servers, relying on the fact the replica is configured to persist
(either RDB of AOF), now it is set explicitly.

(cherry picked from commit 37cf8d8f7faedce704d4c18319e6bf72703e1ddc)
2021-01-12 16:25:37 +02:00
Bob Li
5041095cad Fix overflow of rdbWriteRaw return value (#8306)
Saving string of more than 2GB to the RDB file, can result in corrupt RDB, or failure in rdbSave.
S

(cherry picked from commit 3fb4197a742d064236ae4fdccf9dc00ed3b538d3)
2021-01-12 16:25:37 +02:00
guybe7
2d537b376c Modules: Fix an integer sign bug in moduleTimerHandler (#8131)
bug was introduced in 9cbdc8dcdb

(cherry picked from commit de339c29635091c5ce41b7a061b5aff723952a8b)
2021-01-12 16:25:37 +02:00
Egor Seredin
85bcc60165 Allow '\0' inside of result of sdscatvprintf, and efficiency improvements (#6260)
This will allow to use: RedisModule_CreateStringPrintf(ctx, "%s %c %s", "string1", 0, "string2");

On large string, the previous code would incrementally retry to double the output buffer.
now it uses the the return value of snprintf and grows to the right size in one step.

and also avoids an excessive strlen in sdscat at the end.

(cherry picked from commit 1ad4e18394eac68ab8bae1ef5a2920086ce0f9ba)
2021-01-12 16:25:37 +02:00
guybe7
c01b72f30d Modules: Improve timer accuracy (#7987)
The bug occurs when 'callback' re-registers itself to a point
in the future and the execution time in non-negligible:
'now' refers to time BEFORE callback was executed and is used
to calculate 'next_period'.
We must get the actual current time when calculating 'next_period'

(cherry picked from commit 9cbdc8dcdbaf96869251dd9728c0876adf1b2492)
2021-01-12 16:25:37 +02:00
Meir Shpilraien (Spielrein)
58c00320e3 Moved RMAPI_FUNC_SUPPORTED location such that it will be visible to modules (#8037)
The RMAPI_FUNC_SUPPORTED was defined in the wrong place on redismodule.h
and was not visible to modules.

(cherry picked from commit 560d2dc0081bc35b81b6a64d25c4077fa2e69ad9)
2021-01-12 16:25:37 +02:00
David CARLIER
010223a7f4 raspberry build fix. (#8095)
__ILP32__ is 32 bits ABI and does not imply x86, this patch resolves this. 

(cherry picked from commit 6e44f74dbc1e18383e53c6e86aa72e327c8f47c8)
2021-01-12 16:25:37 +02:00
Yossi Gottlieb
1167967014 Fix crash log output on ARM. (#8020)
(cherry picked from commit 43c07a877cd67ede008c51d227723cfc6c7fd896)
2021-01-12 16:25:37 +02:00
Oran Agra
df32c5a812 Fix cluster access to unaligned memory (SIGBUS on old ARM) (#7958)
Turns out this was broken since version 4.0 when we added sds size
classes.
The cluster code uses sds for the receive buffer, and then casts it to a
struct and accesses a 64 bit variable.
This commit replaces the use of sds with a simple reallocated buffer.

(cherry picked from commit b71d06c269878887eed85b63a731c3d4ad7a8b12)
2021-01-12 16:25:37 +02:00
Oran Agra
39ac9ba73f prevent client tracking from causing feedback loop in performEvictions (#8100)
When client tracking is enabled signalModifiedKey can increase memory usage,
this can cause the loop in performEvictions to keep running since it was measuring
the memory usage impact of signalModifiedKey.

The section that measures the memory impact of the eviction should be just on dbDelete,
excluding keyspace notification, client tracking, and propagation to AOF and replicas.

This resolves part of the problem described in #8069
p.s. fix took 1 minute, test took about 3 hours to write.

(cherry picked from commit b640e2944e42759412ac67228cf64c43dfbed9c3)
2021-01-12 16:25:37 +02:00
Madelyn Olson
b3f7166eb5 White space tweaks and skip categories already applied
(cherry picked from commit b9b8ef113088c56808c47dd4d1c0371bc850198c)
2021-01-12 16:25:37 +02:00
Madelyn Olson
a3806ed216 Further improved ACL algorithm for picking categories
(cherry picked from commit 2eae7756fd77824806b7d5c602c7587b0f4e34c7)
2021-01-12 16:25:37 +02:00
Yang Bodong
356e8f1afb Swapdb should make transaction fail if there is any client watching keys (#8239)
This PR not only fixes the problem that swapdb does not make the
transaction fail, but also optimizes the FLUSHALL and FLUSHDB command to
set the CLIENT_DIRTY_CAS flag to avoid unnecessary traversal of clients.

FLUSHDB was changed to first iterate on all watched keys, and then on the
clients watching each key.
Instead of iterating though all clients, and for each iterate on watched keys.

Co-authored-by: Oran Agra <oran@redislabs.com>
(cherry picked from commit f571f8467cecb69a1c7c6810a445addfb802d85a)
2021-01-12 16:25:37 +02:00
Itamar Haber
eeede65172 Adds 'use-memory' to GEORADIUS[BYMEMBER] (#8107)
Partial resolution for #6860, item 7

(cherry picked from commit 872a6c09e16eab903205d85890f59aa028a490d2)
2021-01-12 16:25:37 +02:00
Oran Agra
426a976a29 fix valgrind warning created by recent pidfile fix (#8235)
This isn't a leak, just an warning due to unreachable
allocation on the fork child.
Problem created by 4192faa

(cherry picked from commit 997c2dc7ec652ac49a6f1a3a5bb79627aff1a545)
2021-01-12 16:25:37 +02:00