Commit Graph

173 Commits

Author SHA1 Message Date
1293e2a565 Only increment delivery count if JUSTID option is omitted 2019-03-13 11:57:20 +01:00
3cc4f469bc 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-13 11:57:15 +01:00
0ed3970f2c fix small test suite race conditions 2018-12-11 17:58:50 +01:00
7c8cf5acdd Don't call sdscmp() with shared.maxstring or shared.minstring 2018-12-11 17:58:19 +01:00
39e9eda377 Add unit test for stream XCLAIM command. 2018-12-11 17:57:54 +01:00
17b4cd83f4 Test: regression test for #5570. 2018-11-20 08:32:50 +01:00
44ad514185 Test: regression test for #5577. 2018-11-20 08:32:31 +01:00
de0ae56c84 Tests for XGROUP CREATE MKSTREAM. 2018-10-17 12:12:04 +02:00
6dd4d864a9 Streams: Tests modified XSTREAM -> XSETID 2018-10-17 11:02:34 +02:00
880b563e2d Tests modified to use XADD MAXLEN 0 + XSETID.
See #5426.
2018-10-17 11:02:34 +02:00
f4b4db1387 Streams: add tests for aof rewrite 2018-10-17 11:02:34 +02:00
6455274d1c Streams: add tests for XSTREAM command 2018-10-17 11:02:34 +02:00
80c471f58e Test: cgroup propagation test also for NOACK variant.
Related to #5433.
2018-10-15 13:05:17 +02:00
8defa5da3c Test: consumer group last ID slave propagation test.
This is a regression for #5433.
2018-10-15 13:05:17 +02:00
6a2981101b Streams: add test cases for XADD/XTRIM maxlen 2018-10-09 18:30:34 +02:00
70c4bcb7bc Test: new sorted set skiplist order consistency.
This should be able to find new bugs and regressions about the new
sorted set update function when ZADD is used to update an element
already existing.

The test is able to find the bug fixed at 2f282aee immediately.
2018-08-02 18:34:34 +02:00
2352a51992 Test: XDEL fuzz testing. Remove and check stage. 2018-07-13 17:58:17 +02:00
d6efd5fc1d Test: XDEL fuzz testing, stream creation. 2018-07-13 17:47:26 +02:00
a93f8f0998 Test: XDEL basic test. 2018-07-13 17:40:48 +02:00
8d6b7861a7 Add regression test for #5111. 2018-07-12 13:35:17 +02:00
93238575f7 Fix typo 2018-07-03 18:19:46 +02:00
6bf65138de Regression test for issue #5006. 2018-06-12 13:13:35 +02:00
0a698e499a ZPOP: invert score-ele to match ZRANGE WITHSCORES order. 2018-06-05 17:06:25 +02:00
2bd36616ba Streams: fix test ID format. 2018-05-25 16:57:08 +02:00
e87c1f1e6c ZPOP: fix the tests according to new non-blocking "count" argument. 2018-05-11 18:07:10 +02:00
6efb6c1e06 ZPOP: renaming to have explicit MIN/MAX score idea.
This commit also adds a top comment about a subtle behavior of mixing
blocking operations of different types in the same key.
2018-05-11 17:31:53 +02:00
438125b47c Implements [B]Z[REV]POP and the respective unit tests
An implementation of the
[Ze POP Redis Module](https://github.com/itamarhaber/zpop) as core
Redis commands.

Fixes #1861.
2018-04-30 02:10:42 +03:00
54b9a0e612 CG: test XACK remaining features. 2018-03-15 12:54:10 +01:00
5f8c57f28a CG: test XACK ability to remove items from the PELs. 2018-03-15 12:54:10 +01:00
f5799e728a CG: test XPENDING ability to return pending items. 2018-03-15 12:54:10 +01:00
c2ecac4746 CG: test XGROUPREAD abilities. 2018-03-15 12:54:10 +01:00
c9d86c2b16 CG: More specific duplicated group error. 2018-03-15 12:54:10 +01:00
45fe1f5e00 Streams: add some initial test for XREVRANGE. 2017-12-01 10:24:25 +01:00
1898c50573 Streams: fix XREAD test broken after previous tests improvements.
10% of times the data is not just "item 0" but there is also the
"otherfield" part. Use [lrange] to avoid the issue.
This commit fixes #4416.
2017-12-01 10:24:24 +01:00
5082ec6419 Streams: move ID ms/seq separator from '.' to '-'
After checking with the community via Twitter (here:
https://twitter.com/antirez/status/915130876861788161) the verdict was to
use ":". However I later realized, after users lamented the fact that
it's hard to copy IDs just with double click, that this was the reason
why I moved to "." in the first instance. Fortunately "-", that was the
other option with most votes, also gets selected with double click on
most terminal applications on Linux and MacOS.

So my reasoning was:

1) We can't retain "." because it's actually confusing to newcomers, it
looks like a floating number, people may be tricked into thinking they
can order IDs numerically as floats.

2) Moving to a double-click-to-select format is much better. People will
work with such IDs for long time when coding / debugging. Why making now
a choice that will impact this for the next years?

The only other viable option was "-", and that's what I did. Thanks.
2017-12-01 10:24:24 +01:00
e53c90308b Streams: add XADD + MAXLEN test. 2017-12-01 10:24:24 +01:00
7d0d9693c1 Streams: modify tests to stress compression. 2017-12-01 10:24:24 +01:00
ae9065d808 Streams: tests for blocking and non-blocking XREAD. 2017-12-01 10:24:24 +01:00
eb1230c999 Streams: XRANGE fuzz testing. 2017-12-01 10:24:24 +01:00
fa707ca154 Streams: more advanced XADD and XRANGE tests. 2017-12-01 10:24:24 +01:00
7a41b402c1 Streams: basic XADD tests. 2017-12-01 10:24:24 +01:00
adf2701cc9 fix string to double conversion, stopped parsing on \0 even if the string has more data.
getLongLongFromObject calls string2ll which has this line:
/* Return if not all bytes were used. */
so if you pass an sds with 3 characters "1\01" it will fail.

but getLongDoubleFromObject calls strtold, and considers it ok if eptr[0]==`\0`
i.e. if the end of the string found by strtold ends with null terminator

127.0.0.1:6379> set a 1
OK
127.0.0.1:6379> setrange a 2 2
(integer) 3
127.0.0.1:6379> get a
"1\x002"
127.0.0.1:6379> incrbyfloat a 2
"3"
127.0.0.1:6379> get a
"3"
2017-11-23 17:15:27 +02:00
b2e295971f Regression test for issue #4391. 2017-10-30 13:45:46 +01:00
7c8ddab4f8 Test: fix conditional execution of HINCRBYFLOAT representation test. 2017-02-22 12:00:09 +01:00
24bd9b19f6 Test: new randomized stress tester for #3343 alike bugs. 2016-06-28 09:42:20 +02:00
f983318e52 Stress tester WIP. 2016-06-28 09:33:36 +02:00
49899866c8 Regression test for issue #3343 exact min crash sequence.
Note: it was verified that it can crash the test suite without the patch
applied.
2016-06-28 09:27:14 +02:00
d88c3c77be make RPUSHX and LPUSHX variadic 2016-06-05 16:50:24 +02:00
0b4bb502a2 Fix ZINCRBY return value. 2016-04-18 00:35:54 -03:00
fceaa46dda Test HINCRBYFLOAT rounding only in x86_64 and when valgrind is not in use.
64 bit double math is not enough to make the test passing, and rounding
to 1.2999999 instead of 1.23 is not an error in the implementation.
Valgrind and sometimes other archs are not able to work with 80 bit
doubles.
2015-11-28 09:28:37 +01:00