1042 Commits

Author SHA1 Message Date
antirez
d76d5e06fa Minor improvements to PR #5187. 2018-07-31 17:30:12 +02:00
Salvatore Sanfilippo
35099b2312 Merge pull request #5187 from oranagra/testsuite_improvements
Testsuite improvements
2018-07-31 17:20:09 +02:00
Oran Agra
dfdeb6a036 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-07-30 19:13:15 +03:00
Oran Agra
e2065c7fab 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:24:27 +03:00
Oran Agra
f7e8219353 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
28cf208bf3 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
b01cb491a8 Test: XDEL fuzz testing. Remove and check stage. 2018-07-13 17:58:17 +02:00
antirez
dc475bcedd Test: fix lshuffle by providing the "K" combinator. 2018-07-13 17:52:39 +02:00
antirez
51bb49d8f2 Test: add lshuffle in the Tcl utility functions set. 2018-07-13 17:51:03 +02:00
antirez
6ddca524c4 Test: XDEL fuzz testing, stream creation. 2018-07-13 17:47:26 +02:00
antirez
ee176661ca Merge branch 'unstable' of github.com:/antirez/redis into unstable 2018-07-13 17:41:10 +02:00
antirez
9b799a052d Test: XDEL basic test. 2018-07-13 17:40:48 +02:00
WuYunlong
1362d2d348 Add test in slowlog.tcl 2018-07-13 17:51:06 +08:00
antirez
fadce22ae9 Add regression test for #5111. 2018-07-12 13:35:17 +02:00
Jack Drogon
bae1d36e5d Fix typo 2018-07-03 18:19:46 +02:00
Salvatore Sanfilippo
3613a8ae24 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
57c5bd3ae7 Merge pull request #5081 from trevor211/fixClusterFailover
cluster failover bug
2018-07-03 12:36:53 +02:00
chendianqiang
602d502e5c Merge branch 'unstable' into pending-querybuf 2018-07-03 10:07:26 +08:00
WuYunlong
c30b70b3fa 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
117a76ac63 limit the size of pending-querybuf in masterclient 2018-07-01 14:43:53 +08:00
WuYunlong
db2c29a61e cluster.tcl: Add master consecutively down test. 2018-06-30 09:29:35 +08:00
Oran Agra
dcd3529acf minor fix in creating a stream NACK for rdb and defrag tests 2018-06-27 15:34:17 +03:00
Salvatore Sanfilippo
bd45c0c09a Merge pull request #5063 from oranagra/test_suite_improvements
test suite infra improvements and fix
2018-06-27 14:07:25 +02:00
Oran Agra
160802b06f add active defrag support for streams 2018-06-27 15:00:41 +03:00
Oran Agra
4436bff8a2 test suite infra improvements and fix
* fail the test (exit code) in case of timeout.
* add --wait-server to allow attaching a debugger
* add --dont-clean to keep log files when tests are done
2018-06-26 20:23:55 +03:00
antirez
4ab50e35ba Sentinel: test command renaming feature. 2018-06-26 16:08:43 +02:00
shenlongxing
dbd1e254bd fix typo 2018-06-21 22:08:09 +08:00
Guy Benoish
4330bc3e3a Enhance RESTORE with RDBv9 new features
RESTORE now supports:
1. Setting LRU/LFU
2. Absolute-time TTL

Other related changes:
1. RDB loading will not override LRU bits when RDB file
   does not contain the LRU opcode.
2. RDB loading will not set LRU/LFU bits if the server's
   maxmemory-policy does not match.
2018-06-20 15:11:08 +07:00
antirez
93b97389fb Test RDB stream encoding saving/loading. 2018-06-19 16:29:15 +02:00
antirez
030543ce25 Fix SCAN bug regression test, avoiding empty SREM call. 2018-06-14 12:21:58 +02:00
antirez
e937fff4ab Regression test for issue #5006. 2018-06-12 13:13:35 +02:00
antirez
0a4201713a Improved regression test for #4906.
Removing the fix about 50% of the times the test will not be able to
pass cleanly. It's very hard to write a test that will always fail, or
actually, it is possible but then it's likely that it will consistently
pass if we change some random bit, so better to use randomization here.
2018-06-11 13:10:06 +02:00
antirez
6bef2759bb Regression test for the dictScan() issue #4906. 2018-06-11 12:51:26 +02:00
antirez
2c08c2d425 ZPOP: invert score-ele to match ZRANGE WITHSCORES order. 2018-06-05 17:06:25 +02:00
antirez
5b69ad6e6d Streams: fix test ID format. 2018-05-25 16:57:08 +02:00
antirez
9108bbab07 Make active defragmentation tests optional.
They failed when active defrag could not be activated because the
Jemalloc version does not include the additional APIs.
2018-05-24 18:04:21 +02:00
antirez
d7daa627ed Merge branch 'unstable' of github.com:/antirez/redis into unstable 2018-05-17 16:53:14 +02:00
antirez
d5a97bb256 Merge remote-tracking branch 'artix/trib2cli' into unstable 2018-05-17 16:52:31 +02:00
Salvatore Sanfilippo
04c53669e1 Merge pull request #4927 from oranagra/defrag_32bit_fix
Active defrag fixes for 32bit builds
2018-05-17 12:24:40 +02:00
Oran Agra
0bd6e341f5 Active defrag fixes for 32bit builds
problems fixed:
* failing to read fragmentation information from jemalloc
* overflow in jemalloc fragmentation hint to the defragger
* test suite not triggering eviction after population
2018-05-17 09:52:00 +03:00
antirez
402de41034 Test: fix blocking lists/zsets replication test.
By verifying that it was able to find a regression, and fixing it
accordingly.
2018-05-15 17:43:41 +02:00
antirez
3d8651911a Test: replication test blocking lists/zsets ops. 2018-05-15 17:33:29 +02:00
antirez
d0326f472e ZPOP: fix the tests according to new non-blocking "count" argument. 2018-05-11 18:07:10 +02:00
antirez
cbbeef707e 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
Itamar Haber
52c9565dda 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
artix
ff03a6c51d Cluster tests now using redis-cli instead of redis-trib 2018-04-23 16:28:48 +02:00
antirez
81383a5b45 AOF: run tests with preamble off when it makes sense. 2018-03-25 13:03:38 +02:00
Salvatore Sanfilippo
d799fdf733 Merge pull request #4691 from oranagra/active_defrag_v2
Active defrag v2
2018-03-22 09:16:32 +01:00
antirez
72282c440b CG: test XACK remaining features. 2018-03-15 12:54:10 +01:00
antirez
c72389ef0f CG: test XACK ability to remove items from the PELs. 2018-03-15 12:54:10 +01:00