10323 Commits

Author SHA1 Message Date
John Sully
b81dee212a Fix TSAN errors in fastlock
Former-commit-id: 2e159e6ea3fa8bb26c2f471f1493ab6593b85cff
2020-09-21 03:26:50 +00:00
John Sully
3b66147997 Fix issue #222
Former-commit-id: 02b533fec3473f67377237f195004ec1d438d84a
2020-09-21 01:09:58 +00:00
John Sully
d38583454c Make multimaster replication info statelessly paresable
Former-commit-id: de3099e6d880b7a544fd184e0f4c172f4d371c77
2020-09-20 23:57:06 +00:00
John Sully
17648d9705 Dramatically improve the performance of subkey expires
Former-commit-id: 368f67f42217c5fd2cfb3cb3643984917793e994
2020-09-20 23:30:21 +00:00
John Sully
fb53b5630c Reduce test noise
Former-commit-id: 13c9a094d1636d4ea9842746e20096eabbd80cba
2020-09-19 22:00:17 +00:00
John Sully
2f1a99efa5 Fix CI failure due to apt host changes
Former-commit-id: 0f8b7a19ef826cdb986204d9553051d2a25eb8ad
2020-09-19 21:49:59 +00:00
John Sully
bf6569afb3 Avoid memory overhead in situations it won't be used (active rep only)
Former-commit-id: 8f7d977f9068904eca783fefbb24df4d8abd4214
2020-09-19 21:44:59 +00:00
John Sully
ced0413189 Update endurance test for ubuntu 20
Former-commit-id: 064440ee8477baabfd7ce481fa00b9d458f70447
2020-09-17 02:10:18 +00:00
John Sully
ec72a9451e Fix build break
Former-commit-id: 50641d0569e8f4814b332da60ccd6d1bf425c53f
2020-09-17 00:53:56 +00:00
John Sully
17592f1da3 master_global_link_status should respect the quorum
Former-commit-id: f5ecc77e298d980f73ab34f7f1984bc7b9d451f4
2020-09-17 00:31:10 +00:00
John Sully
de3769b3ee Allow reads during an active replica load, optionally allow writes as an experimental feature
Former-commit-id: 655bb6e21c5e814980a7b8b3ac1481ef142c1845
2020-09-17 00:13:03 +00:00
John Sully
e125742671 Implement replica-quorum config
Former-commit-id: ab4cdd2ed4d3ee9752737d20662178d73d16b4c2
2020-09-16 03:26:31 +00:00
Yossi Gottlieb
3d111508a1 TLS: Session caching configuration support. (#7420)
* TLS: Session caching configuration support.
* TLS: Remove redundant config initialization.


Former-commit-id: d3834c50699bc4f31f381d6d03d4c1b022380895
2020-09-16 02:10:29 +00:00
John Sully
dc9b75314b Protocol error in client command
Former-commit-id: 7a1b2c58c3de736540cf4ec7f1539be63a54f5ac
2020-09-11 20:48:18 +00:00
John Sully
4a3e312551 Fix more protocol errors
Former-commit-id: 7fc6d6c6b177ad88dcddd0f4a7f68b74ccdaf037
2020-09-11 20:47:27 +00:00
John Sully
caac3d12f9 Fix protocol difference with Redis
Former-commit-id: dec5db4e71231135570d1f03cde4203ec0b87e44
2020-09-11 20:08:26 +00:00
Oran Agra
40f2c892e5 6.0.8 2020-09-10 14:09:00 +03:00
Oran Agra
e4a7840d34 Fix RESP3 response for HKEYS/HVALS on non-existing key 2020-09-10 14:09:00 +03:00
Oran Agra
4de93718a7 Fix leak in new blockedclient module API test
(cherry picked from commit 0e20ad14a6a857cb168b808f94721df19b23dc0c)
2020-09-10 14:09:00 +03:00
Yossi Gottlieb
d3945c636d Tests: fix oom-score-adj false positives. (#7772)
The key save delay is too short and on certain systems the child process
is gone before we have a chance to inspect it.

(cherry picked from commit 1abc94155a26356f7fcaf5d20b80f031a55a3e82)
2020-09-10 14:09:00 +03:00
杨博东
d12e141780 Tests: Add aclfile load and save tests (#7765)
improves test coverage

(cherry picked from commit ce1466831686b617f72ffbdc51dde137ce5cf9ff)
2020-09-10 14:09:00 +03:00
Roi Lipman
ee3e45ac6e RM_ThreadSafeContextTryLock a non-blocking method for acquiring GIL (#7738)
Co-authored-by: Yossi Gottlieb <yossigo@gmail.com>
Co-authored-by: Oran Agra <oran@redislabs.com>
(cherry picked from commit b1de173ec0f6a03d6083b87f1505fbf843708685)
2020-09-10 14:09:00 +03:00
Yossi Gottlieb
8fb8c23746 Tests: validate CONFIG REWRITE for all params. (#7764)
This is a catch-all test to confirm that that rewrite produces a valid
output for all parameters and that this process does not introduce
undesired configuration changes.

(cherry picked from commit 995f1fc53f7daf3d289d5d70d7b45cdd486dc6cc)
2020-09-10 14:09:00 +03:00
Oran Agra
de8c720c74 Change THP warning to use madvise rather than never (#7771)
completes 60097d361d4096d3826c7580acffd4053f8a4835

(cherry picked from commit 73e0cd5a7d7c1af90f58b6af260acca4b7eb795e)
2020-09-10 14:09:00 +03:00
Itamar Haber
dc11921961 Documents RM_Call's fmt (#5448)
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 c13fa0aa3619c595f06e191a30710d85a109ad48)
2020-09-10 14:09:00 +03:00
Jan-Erik Rediger
b8dec46e0b Check that THP is not set to always (madvise is ok) (#4001)
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 60097d361d4096d3826c7580acffd4053f8a4835)
2020-09-10 14:09:00 +03:00
Yossi Gottlieb
82aee21c92 Tests: clean up stale .cli files. (#7768)
(cherry picked from commit e5b1ad413bdc05e6539dbaa23b5114e15103516e)
2020-09-10 14:09:00 +03:00
Eran Liberty
7fa69e6394 Allow exec with read commands on readonly replica in cluster (#7766)
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 7bee51bb5b2cccbaae76f4721761880acf4d5a93)
2020-09-10 14:09:00 +03:00
Yossi Gottlieb
aa54351c5b Fix CONFIG REWRITE of oom-score-adj-values. (#7761)
(cherry picked from commit b3782098ae594a5457a9de74ce5e15f1629d077d)
2020-09-10 14:09:00 +03:00
Oran Agra
826b49bcb4 handle cur_test for nested tests
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 610b4ff16a62062338588c4508a73784fb962c0b)
2020-09-10 14:09:00 +03:00
Oran Agra
25efadabbe Add daily CI for MacOS (#7759)
(cherry picked from commit 1701f23b1f8fa4a0f4808e450c50b779674a3e42)
2020-09-10 14:09:00 +03:00
bodong.ybd
cb4f96657b Tests: Some fixes for macOS
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 e90385e2232d41fd7c40dc239279f9837e7bdf57)
2020-09-10 14:09:00 +03:00
Oran Agra
95966ceb24 Fix cluster consistency-check test (#7754)
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 541d2709a0bd1a7f88681afa001c714b19df5dc1)
2020-09-10 14:09:00 +03:00
Yossi Gottlieb
9275c8b990 Tests: fix unmonitored servers. (#7756)
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 871e85b8a75a53f90044ac04b0f5a9ba415c3bfa)
2020-09-10 14:09:00 +03:00
Oran Agra
d37b034321 fix broken cluster/sentinel tests by recent commit (#7752)
da723a917 added a file for stderr to keep valgrind log but i forgot to
add a similar thing when valgrind isn't being used.
the result is that `glob */err.txt` fails.

(cherry picked from commit 470de9a516b0dcb92acb8cf2841ddac604bcbd3a)
2020-09-10 14:09:00 +03:00
Oran Agra
540841d6f7 Improve valgrind support for cluster tests (#7725)
- 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 da723a917dec7f2514d821a615668e158bb4f60c)
2020-09-10 14:09:00 +03:00
Oran Agra
81476c0cf7 test infra - add durable mode to work around test suite crashing
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 cf22e8eb91c2c1a769fda4c4de9eba3163dd7f05)
2020-09-10 14:09:00 +03:00
Oran Agra
e001152825 test infra - wait_done_loading
reduce code duplication in aof.tcl.
move creation of clients into the test so that it can be skipped

(cherry picked from commit cc455a710cc68d0fd8243cd1f04c5ee7332e4fdb)
2020-09-10 14:09:00 +03:00
Oran Agra
f180326b65 test infra - flushall between tests in external mode
(cherry picked from commit 2468c17a3229ae37825466a18dce9a5272eeef30)
2020-09-10 14:09:00 +03:00
Oran Agra
575d07b7a8 test infra - improve test skipping ability
- skip full units
- skip a single test (not just a list of tests)
- when skipping tag, skip spinning up servers, not just the tests
- skip tags when running against an external server too
- allow using multiple tags (split them)

(cherry picked from commit 5c61f1a6ed876186b944e79f903354cd81077bb6)
2020-09-10 14:09:00 +03:00
Oran Agra
7d3cec9686 test infra - reduce disk space usage
this is important when running a test with --loop

(cherry picked from commit fc18f16260d15b3584d92f73cebafa3a552e2686)
2020-09-10 14:09:00 +03:00
Oran Agra
60bec0c20c test infra - write test name to logfile
(cherry picked from commit e783c03dd1828fbf67259ee037a4faf835c4700a)
2020-09-10 14:09:00 +03:00
Yossi Gottlieb
e5db52f19f redis-cli: fix writeConn() buffer handling. (#7749)
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 94cd74e5deb18e0383bcad5c596c72980e5350b6)
2020-09-10 14:09:00 +03:00
Oran Agra
894016c396 Print server startup messages after daemonization (#7743)
When redis isn't configured to have a log file, having these prints
before damonization puts them in the calling process stdout rather than
/dev/null

(cherry picked from commit 0db61f564991ad483e2a2014738f25628584476b)
2020-09-10 14:09:00 +03:00
Thandayuthapani
f8d0d902a5 Add masters/replicas options to redis-cli --cluster call command (#6491)
* 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 535222063951cc1f3c2c8f78fd84fb9e0d8acefd)
2020-09-10 14:09:00 +03:00
Oran Agra
9f60eb0a3e fix README about BUILD_WITH_SYSTEMD usage (#7739)
BUILD_WITH_SYSTEMD is an internal variable. Users should use USE_SYSTEMD=yes.

(cherry picked from commit 9b61917d7f749d29cd37d2ad6f6563683b0b0bf6)
2020-09-10 14:09:00 +03:00
Yossi Gottlieb
7aa207ad2c Fix double-make issue with make && make install. (#7734)
All user-supplied variables that affect the build should be explicitly
persisted.

Fixes #7254

(cherry picked from commit d377b116bad2eab176fe5f5271302823da50c94c)
2020-09-10 14:09:00 +03:00
John Sully
ac42f938e8 Fix whitespace
Former-commit-id: d47aeb1fc8a6804a44035253ad87478b817605cf
2020-09-07 03:35:46 +00:00
John Sully
1c1b114555 Dramatically improve perf by blocking commands
Former-commit-id: e47584b286c41cf0783fe014ac8b6ec187564ade
2020-09-07 00:49:53 +00:00
Oran Agra
6e7733c276 Redis 6.0.7 2020-09-01 09:27:58 +03:00