12903 Commits

Author SHA1 Message Date
Yossi Gottlieb
b057ff81ee TLS: Add missing redis-cli options. (#7456)
* Tests: fix and reintroduce redis-cli tests.

These tests have been broken and disabled for 10 years now!

* TLS: add remaining redis-cli support.

This adds support for the redis-cli --pipe, --rdb and --replica options
previously unsupported in --tls mode.

* Fix writeConn().

(cherry picked from commit d9f970d8d3f0b694f1e8915cab6d4eab9cfb2ef1)
2020-07-20 21:08:26 +03:00
Oran Agra
a9d1014fb2 redis-cli --hotkeys fixed to handle non-printable key names
(cherry picked from commit b23e2510364bd13d9988921235c400c5657a8438)
2020-07-20 21:08:26 +03:00
Oran Agra
183bdc11c0 redis-cli --bigkeys fixed to handle non-printable key names
(cherry picked from commit 6f8a8647de5b16ff937dc25046151619a2eafabb)
2020-07-20 21:08:26 +03:00
Oran Agra
95ba01b538 RESTORE ABSTTL won't store expired keys into the db (#7472)
Similarly to EXPIREAT with TTL in the past, which implicitly deletes the
key and return success, RESTORE should not store key that are already
expired into the db.
When used together with REPLACE it should emit a DEL to keyspace
notification and replication stream.

(cherry picked from commit 5977a94842a25140520297fe4bfda15e0e4de711)
2020-07-20 21:08:26 +03:00
huangzhw
7b21b8c3fb defrag.c activeDefragSdsListAndDict when defrag sdsele, We can't use (#7492)
it to calculate hash, we should use newsds.

(cherry picked from commit d6180c8c8674ffdae3d6efa5f946d85fe9163464)
2020-07-20 21:08:26 +03:00
Oran Agra
33ca884cc5 skip a test that uses +inf on valgrind (#7440)
On some platforms strtold("+inf") with valgrind returns a non-inf result

[err]: INCRBYFLOAT does not allow NaN or Infinity in tests/unit/type/incr.tcl
Expected 'ERR*would produce*' to equal or match '1189731495357231765085759.....'

(cherry picked from commit 909bc97c526db757a3d022b29911ff6d08eba59c)
2020-07-20 21:08:26 +03:00
Oran Agra
2b5f23197c stabilize tests that look for log lines (#7367)
tests were sensitive to additional log lines appearing in the log
causing the search to come empty handed.

instead of just looking for the n last log lines, capture the log lines
before performing the action, and then search from that offset.

(cherry picked from commit 8e76e13472b7d277af78691775c2cf845f68ab90)
2020-07-20 21:08:26 +03:00
Oran Agra
1104113c07 tests/valgrind: don't use debug restart (#7404)
* tests/valgrind: don't use debug restart

DEBUG REATART causes two issues:
1. it uses execve which replaces the original process and valgrind doesn't
   have a chance to check for errors, so leaks go unreported.
2. valgrind report invalid calls to close() which we're unable to resolve.

So now the tests use restart_server mechanism in the tests, that terminates
the old server and starts a new one, new PID, but same stdout, stderr.

since the stderr can contain two or more valgrind report, it is not enough
to just check for the absence of leaks, we also need to check for some known
errors, we do both, and fail if we either find an error, or can't find a
report saying there are no leaks.

other changes:
- when killing a server that was already terminated we check for leaks too.
- adding DEBUG LEAK which was used to test it.
- adding --trace-children to valgrind, although no longer needed.
- since the stdout contains two or more runs, we need slightly different way
  of checking if the new process is up (explicitly looking for the new PID)
- move the code that handles --wait-server to happen earlier (before
  watching the startup message in the log), and serve the restarted server too.

* squashme - CR fixes

(cherry picked from commit 69ade87325eedebdb44760af9a8c28e15381888e)
2020-07-20 21:08:26 +03:00
Oran Agra
62f8583445 change references to the github repo location (#7479)
(cherry picked from commit 9bbf768d3ceaa882c7dcc0033fc3cb4be0973248)
2020-07-20 21:08:26 +03:00
zhaozhao.zz
3155adb299 BITOP: propagate only when it really SET or DEL targetkey (#5783)
For example:
    BITOP not targetkey sourcekey

If targetkey and sourcekey doesn't exist, BITOP has no effect,
we do not propagate it, thus can save aof and replica flow.

(cherry picked from commit 1978f996d8b13db112d5d2fdf4a4ce2baf636729)
2020-07-20 21:08:26 +03:00
antirez
14a59d4ce7 Update comment to clarify change in #7398.
(cherry picked from commit ad0a9df77a2ccf3fdf309dcdd1b54cf350fcbe3c)
2020-07-20 21:08:26 +03:00
antirez
17aaf5ec97 LPOS: option FIRST renamed RANK.
(cherry picked from commit a5a3a7bbc61203398ecc1d5b52c76214f5672776)
2020-07-20 21:08:26 +03:00
Dave Nielsen
3f5cf24da9 updated copyright year
Changed "2015" to "2020"

(cherry picked from commit 2d6d9f75524f280b9bc02613ebe9727b92c1429e)
2020-07-20 21:08:26 +03:00
Oran Agra
05e483cbb3 EXEC always fails with EXECABORT and multi-state is cleared
In order to support the use of multi-exec in pipeline, it is important that
MULTI and EXEC are never rejected and it is easy for the client to know if the
connection is still in multi state.

It was easy to make sure MULTI and DISCARD never fail (done by previous
commits) since these only change the client state and don't do any actual
change in the server, but EXEC is a different story.

Since in the past, it was possible for clients to handle some EXEC errors and
retry the EXEC, we now can't affort to return any error on EXEC other than
EXECABORT, which now carries with it the real reason for the abort too.

Other fixes in this commit:
- Some checks that where performed at the time of queuing need to be re-
  validated when EXEC runs, for instance if the transaction contains writes
  commands, it needs to be aborted. there was one check that was already done
  in execCommand (-READONLY), but other checks where missing: -OOM, -MISCONF,
  -NOREPLICAS, -MASTERDOWN
- When a command is rejected by processCommand it was rejected with addReply,
  which was not recognized as an error in case the bad command came from the
  master. this will enable to count or MONITOR these errors in the future.
- make it easier for tests to create additional (non deferred) clients.
- add tests for the fixes of this commit.

(cherry picked from commit 65a3307bc95aadbc91d85cdf9dfbe1b3493222ca)
2020-07-20 21:08:26 +03:00
antirez
c8f250f8dd Include cluster.h for getClusterConnectionsCount().
(cherry picked from commit 21f62c3346ab22ac37f81110e59dae9372c9e4d1)
2020-07-20 21:08:26 +03:00
antirez
9412094f25 Fix BITFIELD i64 type handling, see #7417.
(cherry picked from commit 746297314f3c198a90ceab8462a40abd9fc69f26)
2020-07-20 21:08:26 +03:00
antirez
8312aa27d4 Clarify maxclients and cluster in conf. Remove myself too.
(cherry picked from commit 59fd178014c7cca1b0c668b30ab0d991dd3030f3)
2020-07-20 21:08:26 +03:00
hwware
d3aa3791fe fix memory leak in sentinel connection sharing
(cherry picked from commit 1bfa2d27a637119226ee3244d2d219c7e5a7ff33)
2020-07-20 21:08:26 +03:00
chenhui0212
2b189f098e Fix comments in function raxLowWalk of listpack.c
(cherry picked from commit f800b52172622b84aa8bdf09aa6cd522aade93be)
2020-07-20 21:08:26 +03:00
Tomasz Poradowski
3328b7a514 ensure SHUTDOWN_NOSAVE in Sentinel mode
- enforcing of SHUTDOWN_NOSAVE flag in one place to make it consitent
  when running in Sentinel mode

(cherry picked from commit 4ee011adb5f0d56085ecd3e5d643ab192ef77ce6)
2020-07-20 21:08:26 +03:00
chenhui0212
88e1f80eee fix comments in listpack.c
(cherry picked from commit 71fafd761ad5f939f485259eb3856ed3766c98be)
2020-07-20 21:08:26 +03:00
antirez
0ebbc36059 Use cluster connections too, to limit maxclients.
See #7401.

(cherry picked from commit 4b8d8826afa0f240b26977e9d128144ebf8d5d7a)
2020-07-20 21:08:26 +03:00
antirez
43ed3c3589 Tracking: fix enableBcastTrackingForPrefix() invalid sdslen() call.
Related to #7387.

(cherry picked from commit 784479939d9e560835a9eb7a410304b46047d5f5)
2020-07-20 21:08:26 +03:00
root
8095daea4a cluster.c remove if of clusterSendFail in markNodeAsFailingIfNeeded
(cherry picked from commit c92464db694172dac8b0f9eeedd366c494d6db8a)
2020-07-20 21:08:26 +03:00
meir@redislabs.com
51e178454d Fix RM_ScanKey module api not to return int encoded strings
The scan key module API provides the scan callback with the current
field name and value (if it exists). Those arguments are RedisModuleString*
which means it supposes to point to robj which is encoded as a string.
Using createStringObjectFromLongLong function might return robj that
points to an integer and so break a module that tries for example to
use RedisModule_StringPtrLen on the given field/value.

The PR introduces a fix that uses the createObject function and sdsfromlonglong function.
Using those function promise that the field and value pass to the to the
scan callback will be Strings.

The PR also changes the Scan test module to use RedisModule_StringPtrLen
to catch the issue. without this, the issue is hidden because
RedisModule_ReplyWithString knows to handle integer encoding of the
given robj (RedisModuleString).

The PR also introduces a new test to verify the issue is solved.

(cherry picked from commit a89bf734a933e45b9dd3ae85ef4c3b62bd6891d8)
2020-07-20 21:08:26 +03:00
antirez
82b2bfd20b Fix LCS object type checking. Related to #7379.
(cherry picked from commit 10553988498acea1d772af69092b67fd5b56d529)
2020-07-20 21:08:26 +03:00
hwware
ec1faeec72 fix memory leak
(cherry picked from commit 7008a0ba66fe13af0d584071eaa5fe3f34c56512)
2020-07-20 21:08:26 +03:00
hwware
c1326d7b10 fix server crash in STRALGO command
(cherry picked from commit 2a05fa0d481d12d3747465c4f14470bdca100c5d)
2020-07-20 21:08:26 +03:00
Benjamin Sergeant
845fb2d1c1 Update redis-cli.c
(cherry picked from commit 93021da221f71cf71fe874fd881ea59f325b82f2)
2020-07-20 21:08:26 +03:00
Jamie Scott
930fac8058 minor fix
(cherry picked from commit 4f3b15e6ea2d72debeb2f0533e2ba11884257021)
2020-07-20 21:08:26 +03:00
John Sully
42c5f664c0 Fix memory leak in MVCC scan
Former-commit-id: 3acf80f8dd5ebc311670398745ef3400333a1fcb
2020-07-16 22:42:24 +00:00
John Sully
a709cf8250 Fix test failure
Former-commit-id: 05d84f5fc184676d32c4bb61ac5957f1787cd4f8
2020-07-14 04:34:40 +00:00
John Sully
655bc912e6 Add new storage-provider-options config
Former-commit-id: 195a28beecc6094f959ddafef7fe33f5b55e4047
2020-07-14 04:24:46 +00:00
John Sully
1653e5d990 Remove gitter, we don't check it often enough
Former-commit-id: 119797014c09c9330e473b904f98353b32d549ab
2020-07-13 21:14:03 -04:00
John Sully
d814d4e172 Merge branch 'keydbpro' of https://github.com/JohnSully/KeyDB-Pro into keydbpro
Former-commit-id: 7ce91d858f298d6172df7152fcf49188ca8251f3
2020-07-13 18:15:15 +00:00
John Sully
346adf976a Perf fixes on expire lock
Former-commit-id: 7f23ac087720317f54a0bc0e0c4774e7b0ef4337
2020-07-13 18:14:52 +00:00
John Sully
f3180d35a5 Build fixes from cherry-pick
Former-commit-id: 70efd87cf71bb230e8b53d1c4ed3dd91997b4d23
2020-07-13 16:09:03 +00:00
John Sully
37784d469a unoredered_map is faster, reduce latency with the switch
Former-commit-id: f241e435ed0fd2988ada887f02e19884fd82be51
2020-07-13 16:04:00 +00:00
John Sully
782e675072 Remove unnecessary work from critical path (Latency Fixes)
Former-commit-id: 096a90deb7afe489875d3186f3f8f43e41fea329
2020-07-13 16:03:52 +00:00
benschermel
46364b5b05 update deb changelog
Former-commit-id: a6782a3c0d35690d0a68da3e1decf1be723d01fd
2020-07-13 01:35:25 -04:00
John Sully
9350d314e2 Bump version
Former-commit-id: f7d7baccc91d3c39fb6ff7ba04c57208522b6583
2020-07-13 03:59:16 +00:00
John Sully
91a803815d Merge branch 'flash_cache' into keydbpro
Former-commit-id: 2a721ef645921d62b39f1374c0a3f5c92b00fae5
2020-07-13 03:53:34 +00:00
John Sully
6a57593467 Merge branch 'PRO_RELEASE_6' into keydbpro
Former-commit-id: bffe010ea5279bee869bc61cc6d933979e10bbea
2020-07-13 03:32:14 +00:00
John Sully
1ad2d96697 Merge branch 'unstable' into keydbpro
Former-commit-id: 0dafbc254a0efd5ee302d5c58fb2ca0a85110104
2020-07-13 03:31:47 +00:00
John Sully
76c73bace8 Merge branch 'unstable' into RELEASE_6
Former-commit-id: eff294e374d4ce0f6258eba6f9b74821a8aa1d9b
2020-07-13 01:05:36 +00:00
John Sully
11372f9b60 Merge branch 'unstable' of https://github.com/JohnSully/KeyDB into unstable
Former-commit-id: e8f568644b88a0f47eee94f6b97d29270014a52d
2020-07-13 01:05:17 +00:00
John Sully
ea603a9eb8 Merge branch 'unstable' into RELEASE_6
Former-commit-id: f7c2006bf69d6c22f6998327ce8e9746b3b9023c
2020-07-13 01:04:49 +00:00
John Sully
d4dd336834 Merge tag '6.0.5' into unstable
Redis 6.0.5


Former-commit-id: b736a95b0d23e4b73daa88c676b76d1d18e8bd17
2020-07-13 00:55:23 +00:00
benschermel
b3c80590bc update rpm permissions
Former-commit-id: 7aec1e5c6463ea77d27833c66e124e8184c4a123
2020-07-12 18:08:29 -04:00
benschermel
9fe6750463 Merge branch 'unstable' of https://github.com/JohnSully/KeyDB into unstable
Former-commit-id: d909d12cb35c1700a54bd9029346da81cb453235
2020-07-12 18:04:40 -04:00