Commit Graph
1092 Commits
Author SHA1 Message Date
John Sully fc4d9e6d1f subkey expire testes
Former-commit-id: 0cf3af6857
2020-01-03 16:50:13 -05:00
John Sully 633b7398e1 Fix issue #107, active replicas do their own expires
Former-commit-id: 8e4f323439
2019-11-20 19:44:31 -05:00
John Sully c34fee9ed4 Merge branch 'unstable' of https://github.com/JohnSully/KeyDB into unstable
Former-commit-id: 16bd6b3f5d
2019-11-14 21:21:46 -05:00
John Sully a098681bbf Cluster multithreading fixes
Former-commit-id: 3dd78a6101
2019-11-14 20:14:24 -05:00
John Sully 75b22fafc2 Fix test failure with tcl8.5 (test only issue)
Former-commit-id: 5e40ea6ee7
2019-11-04 17:31:29 -08:00
John Sully df8a20a744 Signals can happen on any thread, so look for the signal handler not the command on the callstack
Former-commit-id: f1d2b29450
2019-10-24 23:30:08 -04:00
John Sully 2c6fdf0f4e RREPLAY command now takes a DB argument
Former-commit-id: 6e1e5bd08b
2019-09-28 14:59:44 -04:00
John Sully b6b6bb0488 Implement left and right shift BITOP operators
Former-commit-id: ba365298ed
2019-09-28 00:10:46 -04:00
John Sully f31b1fd06b Issue #64 RREPLAY isn't binary safe. Add fix and test.
Former-commit-id: afe66288fe
2019-07-24 22:31:02 -04:00
John Sully bb9b8ee164 Fix bad merge in SCAN KEYS command
Former-commit-id: c21af6b351
2019-07-19 00:43:23 -04:00
John Sully 73df5494a8 Merge commit 'bf963253ecfd367b49081a26c1b5c410558aecfc' into unstable
Former-commit-id: 10986ae3a8
2019-07-18 23:22:36 -04:00
antirez dec2345007 Test: fix slowlog test false positive.
In fast systems "SLOWLOG RESET" is fast enough to don't be logged even
when the time limit is "1" sometimes. Leading to false positives such
as:

[err]: SLOWLOG - can be disabled in tests/unit/slowlog.tcl
Expected '1' to be equal to '0'


Former-commit-id: 8198a697fd
2019-07-18 23:12:52 -04:00
antirez b70266f3d3 Fix test false positive introduced by threaded I/O.
Now clients that are ready to be terminated asynchronously are processed
more often in beforeSleep() instead of being processed in serverCron().
This means that the test will not be able to catch the moment the client
was terminated, also note that the 'omem' figure now changes in big
steps, because of the new client output buffers layout.

So we have to change the test range in order to accomodate for that.
Yet the test is useful enough to be worth taking, even if its precision
is reduced by this commit. Probably if we get more problems, a thing
that makes sense is just to check that the limit is < 200k. That's more
than enough actually.


Former-commit-id: 8aaa8b0b11
2019-07-18 23:12:05 -04:00
John Sully 727bda7108 remove unnecessary variables
Former-commit-id: a9c4e3970f
2019-07-18 19:37:49 -04:00
John Sully 2110b84f7e Fix issue #59 - Test replicaof config variable
Former-commit-id: d5ecc2347a
2019-07-18 19:22:49 -04:00
John Sully 0dd9a27420 Give the active-rep more time to sync for test reliability
Former-commit-id: 620c2ec141
2019-07-12 23:52:07 -04:00
John Sully 03d41318b0 Add Active Replication tests
Former-commit-id: 528d10091f
2019-07-12 03:54:41 -04:00
John Sully 42143ac654 FIX: The dabase count configuration is not respected
Former-commit-id: 149c3cf3dd
2019-07-12 02:13:37 -04:00
John Sully 87d57aa265 lazyfree needs to consume more memory to be detectable
Former-commit-id: 122ec25bf0
2019-07-06 00:53:40 -04:00
John Sully a686622540 We can use less memory in the client output buffers. Its OK
Former-commit-id: 852819180f
2019-07-05 23:43:01 -04:00
Angus Pearson bf963253ec Implement SCAN cursor [TYPE type] modifier suggested in issue #6107.
Add tests to check basic functionality of this optional keyword, and also tested with
a module (redisgraph). Checked quickly with valgrind, no issues.

Copies name the type name canonicalisation code from `typeCommand`, perhaps this would
be better factored out to prevent the two diverging and both needing to be edited to
add new `OBJ_*` types, but this is a little fiddly with C strings.

The [redis-doc](https://github.com/antirez/redis-doc/blob/master/commands.json) repo
will need to be updated with this new arg if accepted.

A quirk to be aware of here is that the GEO commands are backed by zsets not their own
type, so they're not distinguishable from other zsets.

Additionally, for sparse types this has the same behaviour as `MATCH` in that it may
return many empty results before giving something, even for large `COUNT`s.
2019-05-22 16:39:04 +01:00
antirez 1a1ba48390 Test: fix slowlog test false positive.
In fast systems "SLOWLOG RESET" is fast enough to don't be logged even
when the time limit is "1" sometimes. Leading to false positives such
as:

[err]: SLOWLOG - can be disabled in tests/unit/slowlog.tcl
Expected '1' to be equal to '0'
2019-05-14 16:55:52 +02:00
antirez 4f4676a142 Fix test false positive introduced by threaded I/O.
Now clients that are ready to be terminated asynchronously are processed
more often in beforeSleep() instead of being processed in serverCron().
This means that the test will not be able to catch the moment the client
was terminated, also note that the 'omem' figure now changes in big
steps, because of the new client output buffers layout.

So we have to change the test range in order to accomodate for that.
Yet the test is useful enough to be worth taking, even if its precision
is reduced by this commit. Probably if we get more problems, a thing
that makes sense is just to check that the limit is < 200k. That's more
than enough actually.
2019-05-13 17:27:10 +02:00
John Sully 25a904605a Make lazy free test more reliable
Former-commit-id: 54d6eb851b
2019-05-11 17:57:35 -04:00
John Sully e48c132d35 Merge branch 'unstable' of https://github.com/antirez/redis into MergeRedis
Note: some tests failing

Former-commit-id: 86d7276f24
2019-05-11 02:20:34 -04:00
zhaozhao.zz c64aec9ce7 test cases: skiptill -> skip-till 2019-05-10 16:27:25 +08:00
Oran Agra ba809f26d4 make replication tests more stable on slow machines
solving few replication related tests race conditions which fail on slow machines

bugfix in slave buffers test: since the test is executed twice, each time with
a different commands count, the threshold for the delta can't be a constant.
2019-05-05 08:25:01 +03:00
Salvatore Sanfilippo d044e33c20 Merge pull request #5961 from yossigo/modules-tests
Modules tests
2019-04-11 07:56:23 -07:00
antirez c24e32041b ACL: Fix memory leak in ACLResetSubcommandsForCommand().
This commit fixes bug reported at #5998. Thanks to @tomcat1102.
2019-04-08 18:08:37 +02:00
antirez f8a9708aa7 ACL: regression test for #5998. 2019-04-08 18:06:50 +02:00
John Sully 2fef83aa60 Fix some more failing tests
Former-commit-id: cd836a37e7
2019-04-04 00:25:30 -04:00
John Sully a7ed7e06a8 Merge branch 'unstable' into wip-multimaster
Former-commit-id: 4326d22380
2019-04-03 00:12:13 -04:00
John Sully c40779752e Merge branch 'unstable' of https://github.com/antirez/redis into unstable
Former-commit-id: 3745bbd95b
2019-04-03 00:00:38 -04:00
John Sully 55696f4436 Tests are passing! YAY!
Former-commit-id: e300f753c5
2019-04-02 21:36:04 -04:00
John Sully 422ac66531 Make PSYNC2 tests more reliable on slower hardware
Former-commit-id: 7b1dd0b60d
2019-03-26 18:59:31 -04:00
Yossi Gottlieb ec0b6bd2c3 Add runtest-moduleapi with commandfilter coverage. 2019-03-24 12:03:03 +02:00
Yossi Gottlieb 822a992f91 fix: missing initialization. 2019-03-24 12:00:33 +02:00
Yossi Gottlieb 6c0a5fde3d CommandFilter API: REDISMODULE_CMDFILTER_NOSELF.
Add a flag to automatically protect filters from being called
recursively by their own module.
2019-03-21 19:53:12 +02:00
Yossi Gottlieb e2626f69ec CommandFilter API: Add unregister option.
A filter handle is returned and can be used to unregister a filter.  In
the future it can also be used to further configure or manipulate the
filter.

Filters are now automatically unregistered when a module unloads.
2019-03-21 14:44:49 +02:00
John Sully 8ee38fa773 Merge branch 'unstable' of https://github.com/antirez/redis into unstable
Former-commit-id: 31ff6cffee
2019-03-19 01:26:10 -04:00
Yossi Gottlieb a9a6a894e8 CommandFilter API: hellofilter and tests. 2019-03-18 23:07:28 +02:00
Yossi Gottlieb 9095e4dc9b Add command filter Module API tests. 2019-03-18 19:34:52 +02:00
antirez dca7358279 HyperLogLog: speedup fuzz test. 2019-03-15 17:13:19 +01:00
antirez 4208666797 HyperLogLog: dense/sparse repr parsing fuzz test. 2019-03-15 13:52:29 +01:00
John Sully 46853f1357 Merge branch 'unstable' of https://github.com/antirez/redis into unstable
Lots of fixes and improvements from upstream.


Former-commit-id: 261cf24efc
2019-03-13 18:08:22 -04:00
Salvatore Sanfilippo 3e648907ee Merge pull request #5907 from spjwebster/xclaim-increment-delivery-count
Increment delivery counter on XCLAIM unless RETRYCOUNT specified
2019-03-13 11:55:46 +01:00
Steve Webster dfcb227b50 Only increment delivery count if JUSTID option is omitted 2019-03-12 20:27:53 +00:00
Salvatore Sanfilippo e5acc5ef4f Merge pull request #2774 from rouzier/blocking-list-commands-support-milliseconds-floating
Added millisecond resolution for blpop command && friends
2019-03-12 18:10:28 +01:00
Steve Webster f1e7df4b7c Increment delivery counter on XCLAIM unless RETRYCOUNT specified
The XCLAIM docs state the XCLAIM increments the delivery counter for
messages. This PR makes the code match the documentation - which seems
like the desired behaviour - whilst still allowing RETRYCOUNT to be
specified manually.

My understanding of the way streamPropagateXCLAIM() works is that this
change will safely propagate to replicas since retry count is pulled
directly from the streamNACK struct.

Fixes #5194
2019-03-08 17:09:11 +00:00
John Sully 3871725979 All tests pass single thread 2019-02-23 00:09:34 -05:00