14165 Commits

Author SHA1 Message Date
perryitay
3f4f9b6331 Fail EXEC command in case a watched key is expired (#9194)
There are two issues fixed in this commit: 
1. we want to fail the EXEC command in case there is a watched key that's logically
   expired but not yet deleted by active expire or lazy expire.
2. we saw that currently cache time is update in every `call()` (including nested calls),
   this time is being also being use for the isKeyExpired comparison, we want to update
   the cache time only in the first call (execCommand)

Co-authored-by: Oran Agra <oran@redislabs.com>
(cherry picked from commit ac8b1df8850cc80fbf9ce8c2fbde0c1d3a1b4e91)
2021-07-21 21:06:49 +03:00
Huang Zhw
5b8e395174 Do not install a file event to send data to rewrite child when parent stop sending diff to child in aof rewrite. (#8767)
In aof rewrite, when parent stop sending data to child, if there is
new rewrite data, aofChildWriteDiffData write event will be installed.
Then this event is issued and deletes the file event without do anyting.
This will happen over and over again until aof rewrite finish.

This bug used to waste a few system calls per excessive wake-up
(epoll_ctl and epoll_wait) per cycle, each cycle triggered by receiving
a write command from a client.

(cherry picked from commit cb961d8c8e10ff3b619f1579a03336a15e9e6f45)
2021-07-21 21:06:49 +03:00
Omer Shadmi
9914b676b3 Avoid exiting to allow diskless loading to recover from RDB short read on module AUX data (#9199)
Currently a replica is able to recover from a short read (when diskless loading
is enabled) and avoid crashing/exiting, replying to the master and then the rdb
could be sent again by the master for another load attempt by the replica.
There were a few scenarios that were not behaving similarly, such as when
there is no end-of-file marker, or when module aux data failed to load, which
should be allowed to occur due to a short read.

(cherry picked from commit f06d782f5abcb30efb0117841232828ed3e129bf)
2021-07-21 21:06:49 +03:00
Oran Agra
abd44c8393 Fix race in client side tracking (#9116)
The `Tracking gets notification of expired keys` test in tracking.tcl
used to hung in valgrind CI quite a lot.

It turns out the reason is that with valgrind and a busy machine, the
server cron active expire cycle could easily run in the same event loop
as the command that created `mykey`, so that when they key got expired,
there were two change events to broadcast, one that set the key and one
that expired it, but since we used raxTryInsert, the client that was
associated with the "last" change was the one that created the key, so
the NOLOOP filtered that event.

This commit adds a test that reproduces the problem by using lazy expire
in a multi-exec which makes sure the key expires in the same event loop
as the one that added it.

(cherry picked from commit 9b564b525d8ce88295ec14ffdc3bede7e5f5c33e)
2021-07-21 21:06:49 +03:00
Maxim Galushka
f70916f8b0 redis-cli: support for REDIS_REPLY_SET in CSV and RAW output. (#7338)
Fixes #6792. Added support of REDIS_REPLY_SET in raw and csv output of `./redis-cli`

Test:

run commands to test:
  ./redis-cli -3 --csv COMMAND
  ./redis-cli -3 --raw COMMAND

Now they are returning resuts, were failing with: "Unknown reply type: 10" before the change.

(cherry picked from commit 96bb078577ce2b0d093c873faae5d3ecca26a1de)
2021-07-21 21:06:49 +03:00
malavan
4291d2ddd1 remove duplicate function
Former-commit-id: 81cf9979ed1d86d0a690e5cd27ed018b125b1d58
2021-07-21 16:00:24 +00:00
malavan
a269f35002 add stacktrace message
Former-commit-id: 5be1620629ce8de7f419bc001f18d22d6eb4fa8a
2021-07-19 23:17:18 +00:00
malavan
fe2292f111 dd comment and set eip unused
Former-commit-id: 685b87e2ef4f67cd599b12e38b08f5b70b7a6c58
2021-07-19 17:32:38 +00:00
malavan
4bc552fba2 dd comment and set eip unused
Former-commit-id: 72429c21067318696897c26783f654eb7bc6040f
2021-07-19 17:31:24 +00:00
malavan
7d4b413958 dd comment and set eip unused
Former-commit-id: 7707fe15a9c9774820b3afb9837a50e73c40a5a8
2021-07-19 17:29:43 +00:00
malavan
c49a46ca8a add backtrace for alpine using libunwind
Former-commit-id: c583ffff412b9df705b7c96e68e3908b645c7d43
2021-07-19 17:20:52 +00:00
Christian Legge
8fdd54ceec Merge pull request #321 from EQ-Alpha/ci-flags-fix
Requested changes from 6.2.2 merge

Former-commit-id: 7c1ab8b8e274972ad807296f756ebf80fcddd04b
2021-07-15 16:42:02 -04:00
christianEQ
e400c205ce fix warnings for mac build
Former-commit-id: 570fbd014944a655f6c8e7216f2b9226f378c7c7
2021-07-15 20:14:14 +00:00
christianEQ
c502e6f2a1 Merge remote-tracking branch 'origin/unstable' into ci-flags-fix
Former-commit-id: da1f09e9b551cacdfd24dc839ee659a5e5e1e1de
2021-07-14 22:56:15 +00:00
malavan
3a379f0934 use INVALID_EXPIRE instead of -1
Former-commit-id: 9e45984a97a293d87474f87612204a24c831a343
2021-07-14 22:13:29 +00:00
christianEQ
502b9ec2ce added REDIS_CFLAGS to makefile for backwards compatibility
Former-commit-id: b2fb4f4b9bba28f45828ead5670fc206a4c2a2f6
2021-07-14 21:51:44 +00:00
malavan
4509c6e0a1 cleanup based on 6.2.2 merge review
Former-commit-id: 51277b17a7ab4bb5b3f06fd5af8f26257ac35a37
2021-07-14 15:22:27 -04:00
Christian Legge
e6a621c873 Merge pull request #322 from EQ-Alpha/diagnostic-tool
Basic first iteration of Diagnostic Tool

Former-commit-id: 32f5ef864e85a46ed81d3a2fdfd51d0be4f361f5
2021-07-14 14:19:44 -04:00
Christian Legge
31584fd848 Merge pull request #327 from EQ-Alpha/issue323_fix
fix for #323: seg fault on expiremember

Former-commit-id: a8f28297ec1677f48e9afa9deeb3dbbd2e2f41d9
2021-07-12 16:54:31 -04:00
christianEQ
14011b06ce tabs -> spaces
Former-commit-id: 0ae13c973166106efd17aa6b5dfeb80236ed862c
2021-07-12 18:55:44 +00:00
John Sully
da2aceabcf Merge tag '6.2.3' into unstable
Former-commit-id: 1895dbb7680fa9aadf6040912e89c733abc8c706
2021-07-09 04:40:31 +00:00
christianEQ
db98e1e05b added eq alpha copyright
Former-commit-id: a6cbbd0f318f3a091ed23dbdbcc1593f32fa5e25
2021-07-08 02:58:18 +00:00
christianEQ
da6de72dec fix for #323: seg fault on expiremember
Former-commit-id: f1f52af9cfcac03a1af84265f7e5cb2172e8ebde
2021-07-08 02:50:05 +00:00
christianEQ
d10336b007 various branding and cleanup fixes
Former-commit-id: e3c619eca4755c96af83e1959a6ea5ba95734e93
2021-07-08 02:46:42 +00:00
christianEQ
0a42a4475e removed unused command line options
Former-commit-id: 57e59d97db3674eb241f9bd0836e38f4c8356cac
2021-06-22 17:13:35 +00:00
christianEQ
1b0a1f8fc7 changed --ms to --time
Former-commit-id: d7cada0f38668f67eb307172a3e91599b1f00a24
2021-06-21 19:57:14 +00:00
christianEQ
45c4220b7f added more verbose options
Former-commit-id: fd2ac1fcfc94285cad683528f3d209b204ccfd2b
2021-06-21 18:40:37 +00:00
christianEQ
6b66b56c17 -t threads option
Former-commit-id: 0181b0e7a17ad5f83a544401110a9eac2b292aa4
2021-06-21 18:36:21 +00:00
christianEQ
1db672e81a added starting line so diagnostic tool doesnt look frozen at first
Former-commit-id: 2b5e5cfa4cf1478682c46d74436025c63ac6c217
2021-06-18 20:21:47 +00:00
christianEQ
3b61b689a4 Merge remote-tracking branch 'origin/unstable' into diagnostic-tool
Former-commit-id: bfb0d02622dfc9ac0c67ec68ae8a21cccd5c9004
2021-06-18 20:19:31 +00:00
christianEQ
7d11673ba9 detect stagnating server load before 100% (diagnostic tool)
Former-commit-id: 534b70643b8f39303331048d3e86475caa08b864
2021-06-18 19:01:51 +00:00
christianEQ
6ca00c68f4 added config option for time to spin up new client threads (diagnostic tool)
Former-commit-id: 3d0f729572b175457d4874b6e381754ac47e9055
2021-06-18 16:58:16 +00:00
christianEQ
e6900c37c1 detect full load + server threads (diagnostic tool)
Former-commit-id: fd4ed1e425e32b628c5850e83c9ea9411c471bbe
2021-06-18 16:49:25 +00:00
christianEQ
ef3ba1699d detect client cpu usage in diagnostic tool
Former-commit-id: 693450393c848679b60c5a9bf55428ae1d4f769f
2021-06-17 20:40:10 +00:00
christianEQ
88149ed9e7 accurate cpu usage in diagnostic tool
Former-commit-id: 8ee7584cffc5c5cacfb7ad20fc964112974683e4
2021-06-17 18:32:11 +00:00
John Sully
1554161bdc Prevent test code crash due to no log data
Former-commit-id: 0a56a73bd98d4e692ae77683fdb9dd644ecfc2eb
2021-06-14 22:06:36 +00:00
John Sully
40a5f86dad active defrag tests need to run single threaded because jemalloc has seperate mempools per thread and the numbers won't match otherwise
Former-commit-id: 3a1d3090f2ec5a442e3a7c192987cdfa24094145
2021-06-14 16:32:47 +00:00
christianEQ
b35847e709 changed redis_flags names to keydb in makefile
Former-commit-id: 07273936271536e4a57efdb7a31bc34e5b8d50f1
2021-06-14 16:09:42 +00:00
christianEQ
2c78e8c046 several redis->keydb changes in sentinel.conf
Former-commit-id: d2ef0594711c83ec9223d2e3b26fce9b5a4f685f
2021-06-11 19:16:33 +00:00
christianEQ
974dc4918a renamed redis mentions in runtest files
Former-commit-id: 2e894a512b30a8317619e55fa30a218306f8514f
2021-06-11 19:11:12 +00:00
christianEQ
53be1b7fba renamed redis mention in readme
Former-commit-id: 34b0209f05d4f44e4b14278ad746f1eda679b32a
2021-06-11 19:10:35 +00:00
christianEQ
ac9fadc3dd renamed workspace gitignore
Former-commit-id: 046f5756325992752b51d7ac601fd84d4faa53ce
2021-06-11 19:10:12 +00:00
christianEQ
cb3f3d1b7e renamed redis test files
Former-commit-id: 1c77104b5efcdfd1fce6a4a946e8a1ead35dc7f0
2021-06-11 19:09:40 +00:00
christianEQ
f8289cebcc removed unreliable musl test and left only accurate new one
Former-commit-id: 386be8990a83fcc5d57aa20a268544a877c2cfd7
2021-06-11 18:19:59 +00:00
christianEQ
39a3238a8f changed redis.pid to keydb.pid where necessary
Former-commit-id: 76d9c7c82abe7aecc7301d82e755953a37513138
2021-06-11 18:19:02 +00:00
christianEQ
45480d3aaf removed outdated comment in server.cpp
Former-commit-id: 98f08034a13341059b9b1690989e7ef0207ac920
2021-06-11 18:17:18 +00:00
christianEQ
c2655387fc updated pkg/deb/conf/keydb.conf to use keydb name throughout
Former-commit-id: 308cf77437374f01cc40101f2f35768db7a16302
2021-06-11 18:15:50 +00:00
christianEQ
20b5272f60 removed the question issue template - doesn't seem necessary for us
Former-commit-id: ce64f469f404f79ae0028627e7ebfcc47781eeab
2021-06-11 18:08:19 +00:00
christianEQ
448a1a3879 fixed flag var names in ci
Former-commit-id: e632c3db1b6c8b0294075e60533f40812c554b47
2021-06-11 17:04:33 +00:00
christianEQ
46592a4089 don't enforce upper limit for requests issued; tool will run indefinitely
Former-commit-id: 239d22ed722357f0973c971b998b21f4f7b3b1da
2021-06-11 16:28:29 +00:00