- 10 Sep, 2020 23 commits
-
-
Itamar Haber authored
Improve RM_Call inline documentation about the fmt argument so that we don't completely depend on the web docs. Co-authored-by:
Oran Agra <oran@redislabs.com> (cherry picked from commit ce15620d)
-
Jan-Erik Rediger authored
THP can also be set to madvise, in which case it shouldn't cause problems for Redis since redis (or the allocator) doesn't use madvise to activate it. (cherry picked from commit b2419c31)
-
Yossi Gottlieb authored
(cherry picked from commit 918abd72)
-
Eran Liberty authored
There was a bug. Although cluster replicas would allow read commands, they would not allow a MULTI-EXEC that's composed solely of read commands. Adds tests for coverage. Co-authored-by:
Oran Agra <oran@redislabs.com> Co-authored-by:
Eran Liberty <eranl@amazon.com> (cherry picked from commit b120366d)
-
Yossi Gottlieb authored
(cherry picked from commit 750acf3a)
-
Oran Agra authored
if there are nested tests and nested servers, we need to restore the previous value of cur_test when a test exist. example: ``` test{test 1} { start_server { test{test 1.1 - master only} { } start_server { test{test 1.2 - with replication} { } } } } ``` when `test 1.1 - master only exists`, we're still inside `test 1` (cherry picked from commit 0a1e7341)
-
bodong.ybd authored
1) cur_test: when restart_server, "no such variable" error occurs ./runtest --single integration/rdb test {client freed during loading} SET ::cur_test restart_server kill_server test "Check for memory leaks (pid $pid)" SET ::cur_test UNSET ::cur_test UNSET ::cur_test // This global variable has been unset. 2) `ps --ppid` not available on macOS platform, can be replaced with `pgrep -P pid`. (cherry picked from commit f22fa959)
-
Oran Agra authored
This test was failing from time to time see discussion at the bottom of #7635 This was probably due to timing, the DEBUG SLEEP executed by redis-cli didn't sleep for enough time. This commit changes: 1) use SET-ACTIVE-EXPIRE instead of DEBUG SLEEP 2) reduce many `after` sleeps with retry loops to speed up the test. 3) add many comment explaining the different steps of the test and it's purpose. 4) config appendonly before populating the volatile keys, so that they'll be part of the AOF command stream rather than the preamble RDB portion. other complications: recently kill_instance switched from SIGKILL to SIGTERM, and this would sometimes fail since there was an AOFRW running in the background. now we wait for it to end before attempting the kill. (cherry picked from commit b491d477)
-
Yossi Gottlieb authored
There is an inherent race condition in port allocation for spawned servers. If a server fails to start because a port is taken, a new port is allocated. This fixes a problem where the logs are not truncated and as a result a large number of unmonitored servers are started. (cherry picked from commit 2df4cb93)
-
Oran Agra authored
- redirect valgrind reports to a dedicated file rather than console - try to avoid killing instances with SIGKILL so that we get the memory leak report (killing with SIGTERM before resorting to SIGKILL) - search for valgrind reports when done, print them and fail the tests - add --dont-clean option to keep the logs on exit - fix exit error code when crash is found (would have exited with 0) changes that affect the normal redis test suite: - refactor check_valgrind_errors into two functions one to search and one to report - move the search half into util.tcl to serve the cluster tests too - ignore "address range perms" valgrind warnings which seem non relevant. (cherry picked from commit 2b998de4)
-
Oran Agra authored
in some cases a command that returns an error possibly due to a timing issue causes the tcl code to crash and thus prevents the rest of the tests from running. this adds an option to make the test proceed despite the crash. maybe it should be the default mode some day. (cherry picked from commit fe5da2e6)
-
Yossi Gottlieb authored
Fix issues with writeConn() which resulted with corruption of the stream by leaving an extra byte in the buffer. The trigger for this is partial writes or write errors which were not experienced on Linux but reported on macOS. (cherry picked from commit 58e5feb3)
-
Thandayuthapani authored
* Add master/slave option in --cluster call command * Update src/redis-cli.c * Update src/redis-cli.c Co-authored-by:
Itamar Haber <itamar@redislabs.com> (cherry picked from commit f22f64f0)
-
Yossi Gottlieb authored
All user-supplied variables that affect the build should be explicitly persisted. Fixes #7254 (cherry picked from commit b35d6e5c)
-
- 01 Sep, 2020 17 commits
-
-
Oran Agra authored
-
Oran Agra authored
When runtest-cluster, at first, we need to create a cluster use spawn_instance, a port which is not used is choosen, however sometimes we can't run server on the port. possibley due to a race with another process taking it first. such as redis/redis/runs/896537490. It may be due to the machine problem or In order to reduce the probability of failure when start redis in runtest-cluster, we attemp to use another port when find server do not start up. Co-authored-by:
Oran Agra <oran@redislabs.com> Co-authored-by:
yanhui13 <yanhui13@meituan.com> (cherry picked from commit e2d64485)
-
Yossi Gottlieb authored
This fixes the issue described in CVE-2014-5461. At this time we cannot confirm that the original issue has a real impact on Redis, but it is included as an extra safety measure. (cherry picked from commit d75ad774)
-
Leoš Literák authored
#7728 - update instructions for systemd support (cherry picked from commit 571571ca)
-
Yossi Gottlieb authored
Don't assume `ps` handles `-h` to display output without headers and manually trim headers line from output. (cherry picked from commit b61b6638)
-
Nathan Scott authored
In order to keep the redismodule.h self-contained but still usable with gcc v10 and later, annotate each API function tentative definition with the __common__ attribute. This avoids the 'multiple definition' errors modules will otherwise see for all API functions at link time. Further details at gcc.gnu.org/gcc-10/porting_to.html Turn the existing __attribute__ ((unused)), ((__common__)) and ((print)) annotations into conditional macros for any compilers not accepting this syntax. These macros only expand to API annotations under gcc. Provide a pre- and post- macro for every API function, so that they can be defined differently by the file that includes redismodule.h. Removing REDISMODULE_API_FUNC in the interest of keeping the function declarations readable. Co-authored-by:
Yossi Gottlieb <yossigo@gmail.com> Co-authored-by:
Oran Agra <oran@redislabs.com> (cherry picked from commit 11cd983d)
-
Yossi Gottlieb authored
Add Linux kernel OOM killer control option. This adds the ability to control the Linux OOM killer oom_score_adj parameter for all Redis processes, depending on the process role (i.e. master, replica, background child). A oom-score-adj global boolean flag control this feature. In addition, specific values can be configured using oom-score-adj-values if additional tuning is required. (cherry picked from commit 2530dc0e)
-
Meir Shpilraien (Spielrein) authored
Added RedisModule_HoldString that either returns a shallow copy of the given String (by increasing the String ref count) or a new deep copy of String in case its not possible to get a shallow copy. Co-authored-by:
Itamar Haber <itamar@redislabs.com> (cherry picked from commit 3f494cc4)
-
Arun Ranganathan authored
Co-authored-by:
Oran Agra <oran@redislabs.com> (cherry picked from commit f6cad30b)
-
Meir Shpilraien (Spielrein) authored
Co-authored-by:
Oran Agra <oran@redislabs.com> Co-authored-by:
Itamar Haber <itamar@redislabs.com> (cherry picked from commit 8d826393)
-
Oran Agra authored
65a3307b (released in 6.0.6) has a side effect, when processCommand rejects a command with pre-made shared object error string, it trims the newlines from the end of the string. if that string is later used with addReply, the newline will be missing, breaking the protocol, and leaving the client hung. It seems that the only scenario which this happens is when replying with -LOADING to some command, and later using that reply from the CONFIG SET command (still during loading). this will result in hung client. Refactoring the code in order to avoid trimming these newlines from shared string objects, and do the newline trimming only in other cases where it's needed. Co-authored-by:
Guy Benoish <guy.benoish@redislabs.com> (cherry picked from commit 9fcd9e19)
-
valentinogeron authored
If the server gets MULTI command followed by only read commands, and right before it gets the EXEC it reaches OOM, the client will get OOM response. So, from now on, it will get OOM response only if there was at least one command that was tagged with `use-memory` flag (cherry picked from commit b7289e91)
-
Itamar Haber authored
Otherwise, it is treated as a single allocation and freed synchronously. The following logic is used for estimating the effort in constant-ish time complexity: 1. Check the number of nodes. 1. Add an allocation for each consumer group registered inside the stream. 1. Check the number of PELs in the first CG, and then add this count times the number of CGs. 1. Check the number of consumers in the first CG, and then add this count times the number of CGs. (cherry picked from commit 5b0a06af)
-