10136 Commits

Author SHA1 Message Date
John Sully
9d8897c50e Delete CONTRIBUTING
Former-commit-id: b042495f37f3d22f7759a4c59044af40273c3a1a
2020-10-01 11:17:56 -04:00
John Sully
04f834037a Fix module test failures due to locking
Former-commit-id: 420ccdfbaebc452b9b374b54c6ebeec4a3ffea36
2020-10-01 00:08:54 +00:00
John Sully
3529a1564b Fix TLS test failure due to bad merge
Former-commit-id: 41466a4147bf675f69670016135f88589cc02a5c
2020-09-30 20:21:40 +00:00
John Sully
13d472b160 Keep redis-cli.c C89 compatible
Former-commit-id: 9798f2d711939b03e972207638d18dcaa3b2e473
2020-09-30 20:17:51 +00:00
John Sully
5fd3c39c05 Mac build break fix
Former-commit-id: 5f3543921b4123c2216d9294c5eb7bfed007cbf5
2020-09-30 20:17:02 +00:00
John Sully
6448de4461 Fix stream replication failure with active replication, issue #238
Former-commit-id: a41366cc3a6568c0249a5ee022e517add55e286d
2020-09-30 20:12:54 +00:00
John Sully
14daf6f909 Merge tag '6.0.8' into unstable
Former-commit-id: 4c7e4b91a6bb2034636856b608b8c386d07f5541
2020-09-30 19:47:55 +00:00
John Sully
c0df1ac173 Test RDB merge on load with active replication
Former-commit-id: 28183f4b66fc4c865048080b61e599eeb1d2293b
2020-09-29 03:26:06 +00:00
John Sully
59e86a111b Drop min-clients-per-thread to a more reasonable number
Former-commit-id: a0abc1eddd071f984950ad8918fad0259c495184
2020-09-28 19:17:36 +00:00
John Sully
c373c2b652 Support read only replicas attaching to active replicas (Bug #229)
Former-commit-id: 676644f2db1634f97dd557a6e321234914a5e5d3
2020-09-23 04:16:08 +00:00
John Sully
28fdf8d7d4 Active replicas memory leak
Former-commit-id: 22ac56d62d982ef512b05ecd55d9d51d05ea2958
2020-09-22 21:38:35 +00:00
John Sully
18a3e0ba35 Merge branch 'unstable' of https://github.com/JohnSully/KeyDB into unstable
Former-commit-id: 143f7f634db8adb1f5386d28832a17f7382b750b
2020-09-21 04:42:46 +00:00
Dmitry Dorofeev
a830b2fdbf Fix to support FreeBSD pthread_getthreadid_np call
Former-commit-id: 955faef23a6c080f40896cb9d68391b5586812e9
2020-09-21 00:41:41 -04:00
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