12612 Commits

Author SHA1 Message Date
Ben Schermel
e0d2a1cff6 Merge branch 'keydbpro' into PRO_RELEASE_6
Former-commit-id: cf7ed118553af55a27c3a57c121bc26e18e0ab7e
2020-06-16 14:16:03 -04:00
Ben Schermel
38f5ed20a0 Merge branch 'PRO_RELEASE_6' of https://github.com/JohnSully/KeyDB-Pro into PRO_RELEASE_6
Former-commit-id: ff7ec3ec39d692ed59c945ace5c9a4ec140f5e52
2020-06-16 14:15:51 -04:00
chenhui0212
6b82471098 fix comments in listpack.c 2020-06-16 17:50:38 +08:00
antirez
fc08cafdb0 Use cluster connections too, to limit maxclients.
See #7401.
2020-06-16 11:45:11 +02:00
antirez
714c2be383 Merge branch 'unstable' of github.com:/antirez/redis into unstable 2020-06-16 11:11:01 +02:00
antirez
ae770c3034 Tracking: fix enableBcastTrackingForPrefix() invalid sdslen() call.
Related to #7387.
2020-06-16 11:09:48 +02:00
John Sully
e81a4a159a Fix crash in async delete when storage provider is not set and key doesn't actually exist
Former-commit-id: 4a4828390118ab52851d8bf229c4ae853100053c
2020-06-15 19:47:06 -04:00
Salvatore Sanfilippo
96ca6e9f5d Merge pull request #7396 from MeirShpilraien/fix_dict_scan_module_api
Fix RM_ScanKey module api not to return int encoded strings
2020-06-15 10:43:33 +02:00
root
009a2d443a cluster.c remove if of clusterSendFail in markNodeAsFailingIfNeeded 2020-06-15 10:18:14 +08:00
meir@redislabs.com
e37c16e425 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.
2020-06-14 11:20:15 +03:00
antirez
00e1f87a08 Fix LCS object type checking. Related to #7379. 2020-06-12 12:43:40 +02:00
Salvatore Sanfilippo
c35a814c4f Merge pull request #7375 from hwware/lcs_crash_fix
Fix Server Crash in LCS Command
2020-06-12 12:31:15 +02:00
antirez
d05cc51e4e help.h updated. 2020-06-12 12:16:24 +02:00
antirez
f66fc18807 help.h updated. 2020-06-12 12:16:19 +02:00
antirez
3dc6657ea8 LPOS: tests + crash fix. 2020-06-12 12:08:06 +02:00
antirez
010dd2b320 LPOS: update to latest proposal.
See https://gist.github.com/antirez/3591c5096bc79cad8b5a992e08304f48
2020-06-12 12:08:06 +02:00
antirez
00e400ed66 LPOS: implement the final design. 2020-06-12 12:08:06 +02:00
Paul Spooren
795c807fed LRANK: Add command (the command will be renamed LPOS).
The `LRANK` command returns the index (position) of a given element
within a list. Using the `direction` argument it is possible to specify
going from head to tail (acending, 1) or from tail to head (decending,
-1). Only the first found index is returend. The complexity is O(N).

When using lists as a queue it can be of interest at what position a
given element is, for instance to monitor a job processing through a
work queue. This came up within the Python `rq` project which is based
on Redis[0].

[0]: https://github.com/rq/rq/issues/1197

Signed-off-by: Paul Spooren <mail@aparcar.org>
2020-06-12 12:08:06 +02:00
hwware
8ab655bd7b fix memory leak 2020-06-11 09:56:52 -04:00
antirez
b7db223637 LPOS: tests + crash fix. 2020-06-11 12:39:06 +02:00
antirez
336e8a7fa2 LPOS: update to latest proposal.
See https://gist.github.com/antirez/3591c5096bc79cad8b5a992e08304f48
2020-06-11 11:18:20 +02:00
Ben Schermel
9e9064782d Merge branch 'keydbpro' into PRO_RELEASE_6
Former-commit-id: 97280cec291bca779739e008b9467fbb40a19a5f
2020-06-10 17:35:21 -04:00
Ben Schermel
b301f19c7e Merge branch 'keydbpro' into PRO_RELEASE_6
Former-commit-id: f70e34b999ba842617ed39b88a7f5bb453d570c5
2020-06-10 17:27:34 -04:00
John Sully
ab9e3f1d2a Fix failure to find expire during rehash
Former-commit-id: b66269865cb71a5e1dd33588b012206da2765824
2020-06-10 12:48:54 -04:00
antirez
5766a69a41 LPOS: implement the final design. 2020-06-10 12:49:15 +02:00
Paul Spooren
cc04253b1d LRANK: Add command (the command will be renamed LPOS).
The `LRANK` command returns the index (position) of a given element
within a list. Using the `direction` argument it is possible to specify
going from head to tail (acending, 1) or from tail to head (decending,
-1). Only the first found index is returend. The complexity is O(N).

When using lists as a queue it can be of interest at what position a
given element is, for instance to monitor a job processing through a
work queue. This came up within the Python `rq` project which is based
on Redis[0].

[0]: https://github.com/rq/rq/issues/1197

Signed-off-by: Paul Spooren <mail@aparcar.org>
2020-06-10 12:07:40 +02:00
John Sully
15e2b066f3 Bump version
Former-commit-id: c7b16835b1c52e9d8a4859a5b6e42ea5f6a31df2
2020-06-09 21:03:11 -04:00
John Sully
10908dc384 Merge branch 'keydbpro' into PRO_RELEASE_6
Former-commit-id: 9d8d3a54fdb9eaad0a7cfc3d938fa35d2819fa93
2020-06-09 21:02:55 -04:00
John Sully
29faa06028 Fix assert false alarm when freeTombstoneObjects is called
Former-commit-id: e21a011072505cfa0a37afefb94f7270e80625c5
2020-06-09 20:59:09 -04:00
John Sully
ec01cc23b1 Fix lock inversion
Former-commit-id: 430cf88623fce8f0675ea19f73d98f6cafe9070f
2020-06-09 20:58:03 -04:00
John Sully
324e8e01f2 COW pointer is not thread safe so we need a global expire lock
Former-commit-id: ac12eef75301564d920e622a08e4f586486fd395
2020-06-09 19:58:42 -04:00
John Sully
725fa84a06 keys command should look at the snapshots expire datastructure
Former-commit-id: 70563afab48e607e127c07d637660d94d1eede6d
2020-06-09 18:57:36 -04:00
John Sully
49fecbe1d4 Implement replicaof remove as requested in issue #192
Former-commit-id: 70b80aa5fad6c2191c2142ce49626b81d0950fa8
2020-06-09 12:43:58 -04:00
antirez
ce8f107a5e Redis 6.0.5. 2020-06-09 12:19:30 +02:00
antirez
93e76ba456 Adapt EVAL+busy script test to new behavior. 2020-06-09 12:19:30 +02:00
antirez
5d1b27f4f9 Adapt EVAL+busy script test to new behavior. 2020-06-09 12:19:14 +02:00
antirez
e819e3ee26 Temporary fix for #7353 issue about EVAL during -BUSY. 2020-06-09 11:53:01 +02:00
xhe
5fae6590a1 return the correct proto version
HELLO should return the current proto version, while the code hardcoded
3
2020-06-09 11:53:01 +02:00
Oran Agra
640a4479b0 Don't queue commands in an already aborted MULTI state 2020-06-09 11:53:01 +02:00
Oran Agra
881d2c4663 Avoid rejecting WATCH / UNWATCH, like MULTI/EXEC/DISCARD
Much like MULTI/EXEC/DISCARD, the WATCH and UNWATCH are not actually
operating on the database or server state, but instead operate on the
client state. the client may send them all in one long pipeline and check
all the responses only at the end, so failing them may lead to a
mismatch between the client state on the server and the one on the
client end, and execute the wrong commands (ones that were meant to be
discarded)

the watched keys are not actually stored in the client struct, but they
are in fact part of the client state. for instance, they're not cleared
or moved in SWAPDB or FLUSHDB.
2020-06-09 11:53:01 +02:00
zhaozhao.zz
d496ce7271 AOF: append origin SET if no expire option 2020-06-09 11:53:01 +02:00
Oran Agra
216b5a1aae fix disconnectSlaves, to try to free each slave.
the recent change in that loop (iteration rather than waiting for it to
be empty) was intended to avoid an endless loop in case some slave would
refuse to be freed.

but the lookup of the first client remained, which would have caused it
to try the first one again and again instead of moving on.
2020-06-09 11:53:01 +02:00
zhaozhao.zz
2a8ee55176 donot free protected client in freeClientsInAsyncFreeQueue
related #7234
2020-06-09 11:53:01 +02:00
antirez
e286d3b4b6 Temporary fix for #7353 issue about EVAL during -BUSY. 2020-06-09 11:52:33 +02:00
Ben Schermel
18527706b6 fix issues from rebase
Former-commit-id: 5d7cc28208bbe7b49eed0d1b1c2bb1c31e65e865
2020-06-09 00:10:58 -04:00
Ben Schermel
c6dea493ac update Dockerfile
Former-commit-id: 3f8dcfdf865ca0857bf2d5261b858cc3daa22f3f
2020-06-09 00:10:58 -04:00
Ben Schermel
e0ab07a560 updating changelog
Former-commit-id: 5affe6dd268bb333214f70f5f809050e4b00b28b
2020-06-09 00:10:58 -04:00
Ben Schermel
aecd839fa9 dh9 for stretch deb pkg
Former-commit-id: 5cf02197ba418b5302759c14195ffa33a1db70fe
2020-06-09 00:10:58 -04:00
Ben Schermel
6f52e35b02 fix missing sentinel
Former-commit-id: 01fe9274e8cb73a065d8550f220d07e5eacd0156
2020-06-09 00:10:58 -04:00
Ben Schermel
267c11b427 update changelog
Former-commit-id: e2be81157e9cd1f57b9d734c5536dc0f4d5dbb0b
2020-06-09 00:10:58 -04:00