867 Commits

Author SHA1 Message Date
Steve Webster
1293e2a565 Only increment delivery count if JUSTID option is omitted 2019-03-13 11:57:20 +01:00
Steve Webster
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
antirez
80bccd7195 Remove debugging printf from replication.tcl test. 2018-12-21 11:42:00 +01:00
Oran Agra
0ed3970f2c fix small test suite race conditions 2018-12-11 17:58:50 +01:00
Guy Benoish
7c8cf5acdd Don't call sdscmp() with shared.maxstring or shared.minstring 2018-12-11 17:58:19 +01:00
Qu Chen
39e9eda377 Add unit test for stream XCLAIM command. 2018-12-11 17:57:54 +01:00
antirez
17b4cd83f4 Test: regression test for #5570. 2018-11-20 08:32:50 +01:00
antirez
44ad514185 Test: regression test for #5577. 2018-11-20 08:32:31 +01:00
antirez
de0ae56c84 Tests for XGROUP CREATE MKSTREAM. 2018-10-17 12:12:04 +02:00
zhaozhao.zz
6dd4d864a9 Streams: Tests modified XSTREAM -> XSETID 2018-10-17 11:02:34 +02:00
antirez
880b563e2d Tests modified to use XADD MAXLEN 0 + XSETID.
See #5426.
2018-10-17 11:02:34 +02:00
zhaozhao.zz
f4b4db1387 Streams: add tests for aof rewrite 2018-10-17 11:02:34 +02:00
zhaozhao.zz
6455274d1c Streams: add tests for XSTREAM command 2018-10-17 11:02:34 +02:00
antirez
fbac534fd3 Test: avoid time related false positive in RESTORE test. 2018-10-15 13:05:17 +02:00
antirez
80c471f58e Test: cgroup propagation test also for NOACK variant.
Related to #5433.
2018-10-15 13:05:17 +02:00
antirez
8defa5da3c Test: consumer group last ID slave propagation test.
This is a regression for #5433.
2018-10-15 13:05:17 +02:00
zhaozhao.zz
6a2981101b Streams: add test cases for XADD/XTRIM maxlen 2018-10-09 18:30:34 +02:00
Oran Agra
d6aeca862c 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-10-03 11:19:32 +02:00
antirez
72e0368a36 Slave removal: remove slave from integration tests descriptions. 2018-09-14 12:37:28 +02:00
antirez
c7841c2b71 Slave removal: remove slave from top-level tests descriptions. 2018-09-14 12:37:28 +02:00
antirez
cfd969c777 Fix scripting tests now that we default to commands repl. 2018-09-05 19:55:55 +02:00
antirez
42bce87a83 Test: processing of master stream in slave -BUSY state.
See #5297.
2018-09-04 12:53:53 +02:00
Chris Lamb
8e5423eb85 Correct "did not received" -> "did not receive" typos/grammar. 2018-09-04 12:53:28 +02:00
Oran Agra
af675f0a58 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-29 12:29:23 +02:00
zhaozhao.zz
1203a04f5e adjust qbuf to 26 in test case for client list 2018-08-29 12:28:22 +02:00
antirez
a4d1201eba Test suite: add --loop option.
Very useful with --stop in order to catch heisenbugs.
2018-08-03 12:28:04 +02:00
antirez
273d8191e1 Test suite: new --stop option.
It pauses the test execution once the first failure is found.
2018-08-03 12:28:04 +02:00
antirez
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
antirez
ab237a8e26 Minor improvements to PR #5187. 2018-08-02 18:34:34 +02:00
Oran Agra
1ce3cf7a8f test suite conveniency improvements
* allowing --single to be repeated
* adding --only so that only a specific test inside a unit can be run
* adding --skiptill useful to resume a test that crashed passed the problematic unit.
  useful together with --clients 1
* adding --skipfile to use a file containing list of tests names to skip
* printing the names of the tests that are skiped by skipfile or denytags
* adding --config to add config file options from command line
2018-08-02 18:34:34 +02:00
Oran Agra
4b79fdf1d6 fix slave buffer test suite false positives
it looks like on slow machines we're getting:
[err]: slave buffer are counted correctly in tests/unit/maxmemory.tcl
Expected condition '$slave_buf > 2*1024*1024' to be true (16914 > 2*1024*1024)

this is a result of the slave waking up too early and eating the
slave buffer before the traffic and the test ends.
2018-07-24 11:16:15 +02:00
Oran Agra
f89c93c8ad make active defrag test more stable
on slower machines, the active defrag test tended to fail.
although the fragmentation ratio was below the treshold, the defragger was
still in the middle of a scan cycle.

this commit changes:
- the defragger uses the current fragmentation state, rather than the cache one
  that is updated by server cron every 100ms. this actually fixes a bug of
  starting one excess scan cycle
- the test lets the defragger use more CPU cycles, in hope that the defrag
  will be faster, but also give it more time before we give up.
2018-07-18 10:16:33 +03:00
Oran Agra
bf680b6f8c slave buffers were wasteful and incorrectly counted causing eviction
A) slave buffers didn't count internal fragmentation and sds unused space,
   this caused them to induce eviction although we didn't mean for it.

B) slave buffers were consuming about twice the memory of what they actually needed.
- this was mainly due to sdsMakeRoomFor growing to twice as much as needed each time
  but networking.c not storing more than 16k (partially fixed recently in 237a38737).
- besides it wasn't able to store half of the new string into one buffer and the
  other half into the next (so the above mentioned fix helped mainly for small items).
- lastly, the sds buffers had up to 30% internal fragmentation that was wasted,
  consumed but not used.

C) inefficient performance due to starting from a small string and reallocing many times.

what i changed:
- creating dedicated buffers for reply list, counting their size with zmalloc_size
- when creating a new reply node from, preallocate it to at least 16k.
- when appending a new reply to the buffer, first fill all the unused space of the
  previous node before starting a new one.

other changes:
- expose mem_not_counted_for_evict info field for the benefit of the test suite
- add a test to make sure slave buffers are counted correctly and that they don't cause eviction
2018-07-16 16:43:42 +03:00
antirez
2352a51992 Test: XDEL fuzz testing. Remove and check stage. 2018-07-13 17:58:17 +02:00
antirez
3d7d20b7f3 Test: fix lshuffle by providing the "K" combinator. 2018-07-13 17:52:39 +02:00
antirez
967ad3643c Test: add lshuffle in the Tcl utility functions set. 2018-07-13 17:51:03 +02:00
antirez
d6efd5fc1d Test: XDEL fuzz testing, stream creation. 2018-07-13 17:47:26 +02:00
antirez
699971535e Merge branch 'unstable' of github.com:/antirez/redis into unstable 2018-07-13 17:41:10 +02:00
antirez
a93f8f0998 Test: XDEL basic test. 2018-07-13 17:40:48 +02:00
WuYunlong
b3660be8f5 Add test in slowlog.tcl 2018-07-13 17:51:06 +08:00
antirez
8d6b7861a7 Add regression test for #5111. 2018-07-12 13:35:17 +02:00
Jack Drogon
93238575f7 Fix typo 2018-07-03 18:19:46 +02:00
Salvatore Sanfilippo
526b30a7ce
Merge pull request #5084 from chendq8/pending-querybuf
limit the size of pending-querybuf in masterclient
2018-07-03 13:19:37 +02:00
Salvatore Sanfilippo
02e385169e
Merge pull request #5081 from trevor211/fixClusterFailover
cluster failover bug
2018-07-03 12:36:53 +02:00
chendianqiang
cbb2ac0799
Merge branch 'unstable' into pending-querybuf 2018-07-03 10:07:26 +08:00
WuYunlong
2833cfbe39 fix tests/test_helper.tcl with --wait-server option.
Issue #5063 added --wait-server option, but can not work.
2018-07-02 19:26:52 +08:00
chendianqiang
7de1ada070 limit the size of pending-querybuf in masterclient 2018-07-01 14:43:53 +08:00
WuYunlong
aeb7bc3ec6 cluster.tcl: Add master consecutively down test. 2018-06-30 09:29:35 +08:00
Oran Agra
de495ee7ab minor fix in creating a stream NACK for rdb and defrag tests 2018-06-27 15:34:17 +03:00
Salvatore Sanfilippo
345b4809f4
Merge pull request #5063 from oranagra/test_suite_improvements
test suite infra improvements and fix
2018-06-27 14:07:25 +02:00