520 Commits

Author SHA1 Message Date
Oran Agra
ff0780e8e6 Implement module api for aux data in rdb
Other changes:
* fix memory leak in error handling of rdb loading of type OBJ_MODULE
2019-07-22 21:15:33 +03:00
Salvatore Sanfilippo
89e00762e7 Merge pull request #5779 from madolson/dev-unstable-geo-bugfix
Fixed a rounding bug in geo.tcl
2019-07-15 23:41:57 +02:00
Angus Pearson
4bbaf621a1 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
78978eb5e1 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
5606036fb4 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
Oran Agra
c76bb465f2 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
f55e492701 Merge pull request #5961 from yossigo/modules-tests
Modules tests
2019-04-11 07:56:23 -07:00
antirez
1a505a3ba9 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
b364f3fc21 ACL: regression test for #5998. 2019-04-08 18:06:50 +02:00
Yossi Gottlieb
a631f66710 Add runtest-moduleapi with commandfilter coverage. 2019-03-24 12:03:03 +02:00
Yossi Gottlieb
2d4635b483 fix: missing initialization. 2019-03-24 12:00:33 +02:00
antirez
ca291b0951 HyperLogLog: speedup fuzz test. 2019-03-15 17:13:19 +01:00
antirez
a47cd50a0d HyperLogLog: dense/sparse repr parsing fuzz test. 2019-03-15 13:52:29 +01:00
Salvatore Sanfilippo
cb44f7ece0 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
c652f706cb Only increment delivery count if JUSTID option is omitted 2019-03-12 20:27:53 +00:00
Salvatore Sanfilippo
685d10894b 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
8fd63c220a 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
antirez
1db503c865 Acl: Test: check command rules synthesis. 2019-01-30 12:01:37 +01:00
antirez
c4f8e91a6c ACL: Test: check subcommands (test fails). 2019-01-28 18:29:22 +01:00
antirez
0f7c574f9f ACL: Test: nopass user flag, commands/groups +/- rules. 2019-01-28 12:40:07 +01:00
antirez
3cf816c703 ACL: Test: check default behavior and keys ACLs. 2019-01-28 12:33:18 +01:00
antirez
a791d5a7a1 ACL: Test: check passwords validity and removal. 2019-01-28 12:06:25 +01:00
antirez
f94c5c77b0 ACL: Test: enabled/disabled user. 2019-01-28 11:44:10 +01:00
antirez
18b2257fda ACL: create unit test. 2019-01-28 11:39:58 +01:00
antirez
28a026486d ACL: implement resetpass directive and adjust test. 2019-01-18 11:26:32 +01:00
antirez
d26ecf2415 ACL: AUTH + no default user password raises an error.
This way the behavior is very similar to the past one.
This is useful in order to remember the user she probably failed to
configure a password correctly.
2019-01-17 18:30:23 +01:00
Madelyn Olson
d8f237a761 Fixed a rounding bug in geo.tcl 2019-01-15 07:26:19 +00:00
Salvatore Sanfilippo
0423081513 Merge pull request #5549 from oranagra/fix_test_races
fix small test suite race conditions
2018-11-28 18:17:05 +01:00
antirez
5f4be1f85c Merge branch 'unstable' of github.com:/antirez/redis into unstable 2018-11-28 17:12:32 +01:00
Qu Chen
36af9ebbd4 Add unit test for stream XCLAIM command. 2018-11-28 17:12:03 +01:00
Salvatore Sanfilippo
390e02f2c9 Merge pull request #4737 from guybe7/zlexcount_fix
Don't call sdscmp() with shared.maxstring or shared.minstring
2018-11-28 16:53:32 +01:00
antirez
068e49c65a Test: regression test for #5570. 2018-11-19 17:19:33 +01:00
antirez
562588cf29 Test: regression test for #5577. 2018-11-19 16:50:54 +01:00
Oran Agra
05d6b8b9ae fix small test suite race conditions 2018-11-12 10:26:10 +02:00
antirez
de887c7e1d Tests for XGROUP CREATE MKSTREAM. 2018-10-17 12:11:10 +02:00
zhaozhao.zz
340e1b8c96 Streams: Tests modified XSTREAM -> XSETID 2018-10-16 23:56:26 +08:00
antirez
f501a8367c Tests modified to use XADD MAXLEN 0 + XSETID.
See #5426.
2018-10-16 17:28:56 +02:00
Salvatore Sanfilippo
ff1b36c825 Merge pull request #5426 from soloestoy/feature-xstream
Bugfix data inconsistency after aof rewrite, and add XSTREAM command.
2018-10-16 13:10:36 +02:00
antirez
c5fc1ba9f6 Test: avoid time related false positive in RESTORE test. 2018-10-13 14:17:11 +02:00
antirez
b43c423a81 Test: cgroup propagation test also for NOACK variant.
Related to #5433.
2018-10-10 17:37:41 +02:00
antirez
d2fa12b96a Test: consumer group last ID slave propagation test.
This is a regression for #5433.
2018-10-10 17:32:17 +02:00
zhaozhao.zz
ed72c0fd84 Streams: add tests for aof rewrite 2018-10-09 15:45:58 +08:00
zhaozhao.zz
4ef06caf6e Streams: add tests for XSTREAM command 2018-10-09 15:21:08 +08:00
Salvatore Sanfilippo
06219d42d9 Merge pull request #5141 from soloestoy/fix-xtrim-inconsistency
Fix XTRIM and XADD with MAXLEN inconsistency
2018-10-08 12:00:00 +02:00
Oran Agra
65590b2c5c fix #5024 - commandstats for multi-exec were logged as EXEC.
this was broken a while back by ba9154d7e7bf959b002533384319a1e90545447b
the purpose of which was to fix commandstats for GEOADD
2018-09-30 12:43:11 +03:00
antirez
6b531bb058 Slave removal: remove slave from top-level tests descriptions. 2018-09-11 15:32:28 +02:00
antirez
d5b60e1a4d Fix scripting tests now that we default to commands repl. 2018-09-05 19:54:54 +02:00
Salvatore Sanfilippo
0e0d6b5cec Merge pull request #5265 from oranagra/stabilize_tests
Fix unstable tests on slow machines.
2018-08-27 13:19:31 +02:00
Oran Agra
6f8633fdf2 Fix unstable tests on slow machines.
Few tests had borderline thresholds that were adjusted.

The slave buffers test had two issues, preventing the slave buffer from growing:
1) the slave didn't necessarily go to sleep on time, or woke up too early,
   now using SIGSTOP to make sure it goes to sleep exactly when we want.
2) the master disconnected the slave on timeout
2018-08-21 11:46:07 +03:00
zhaozhao.zz
b250f9d710 adjust qbuf to 26 in test case for client list 2018-08-14 00:57:22 +08:00