Commit Graph

853 Commits

Author SHA1 Message Date
3c43e984db Merge remote-tracking branch 'artix/trib2cli' into unstable 2018-05-17 16:52:31 +02:00
13779c11f8 Merge pull request #4927 from oranagra/defrag_32bit_fix
Active defrag fixes for 32bit builds
2018-05-17 12:24:40 +02:00
ad133e1023 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
e344aa4a6d 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
8327ccef0e Test: replication test blocking lists/zsets ops. 2018-05-15 17:33:29 +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
af4584d608 Cluster tests now using redis-cli instead of redis-trib 2018-04-23 16:28:48 +02:00
2b2652d7c4 AOF: run tests with preamble off when it makes sense. 2018-03-25 13:03:38 +02:00
da621783f0 Merge pull request #4691 from oranagra/active_defrag_v2
Active defrag v2
2018-03-22 09:16:32 +01: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
18ab0e31f3 CG: test group creation. 2018-03-15 12:54:10 +01:00
c9d86c2b16 CG: More specific duplicated group error. 2018-03-15 12:54:10 +01:00
d8207d09ee Cluster: add test for the nofailover flag. 2018-03-14 16:30:32 +01:00
806736cdf9 Adding real allocator fragmentation to INFO and MEMORY command + active defrag test
other fixes / improvements:
- LUA script memory isn't taken from zmalloc (taken from libc malloc)
  so it can cause high fragmentation ratio to be displayed (which is false)
- there was a problem with "fragmentation" info being calculated from
  RSS and used_memory sampled at different times (now sampling them together)

other details:
- adding a few more allocator info fields to INFO and MEMORY commands
- improve defrag test to measure defrag latency of big keys
- increasing the accuracy of the defrag test (by looking at real grag info)
  this way we can use an even lower threshold and still avoid false positives
- keep the old (total) "fragmentation" field unchanged, but add new ones for spcific things
- add these the MEMORY DOCTOR command
- deduct LUA memory from the rss in case of non jemalloc allocator (one for which we don't "allocator active/used")
- reduce sampling rate of the rss and allocator info
2018-03-12 15:08:52 +02:00
5f5be1ee33 Fix integration test NOREPLICAS error time dependent false positive. 2018-01-24 10:10:48 +01:00
c17a0e134f Test: MIGRATE AUTH test added.
Related to #2507.
2018-01-09 18:49:19 +01:00
6f0b19bc5b Regression test for #4505 (Lua AUX field loading). 2017-12-04 10:26:02 +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
6fb04d4637 Regression test: Slave restart with EVALSHA in backlog issue #4483. 2017-11-30 18:37:10 +01:00
c3806f5b72 Merge pull request #4215 from lamby/correct-faield-spelling
Correct spelling of "faield".
2017-11-28 18:08:32 +01:00
dc2df135b3 Test: regression test for latency expire events logging bug.
Regression for #4452.
2017-11-24 18:33:31 +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
6b9f02ac12 Correct spelling of "faield". 2017-08-12 22:21:03 -07:00
b2cd9fcab6 Fix GEORADIUS edge case with huge radius.
This commit closes issue #3698, at least for now, since the root cause
was not fixed: the bounding box function, for huge radiuses, does not
return a correct bounding box, there are points still within the radius
that are left outside.

So when using GEORADIUS queries with radiuses in the order of 5000 km or
more, it was possible to see, at the edge of the area, certain points
not correctly reported.

Because the bounding box for now was used just as an optimization, and
such huge radiuses are not common, for now the optimization is just
switched off when the radius is near such magnitude.

Three test cases found by the Continuous Integration test were added, so
that we can easily trigger the bug again, both for regression testing
and in order to properly fix it as some point in the future.
2017-07-03 19:38:31 +02:00
530fcf8687 Fix set with ex/px option when propagated to aof 2017-06-16 17:51:38 +08:00
53cb27b1d7 SLOWLOG: log offending client address and name. 2017-06-15 12:57:54 +02:00
a4c7f34d3a Regression test for #3899 fixed. 2017-04-28 11:16:39 +02:00
c180bc7d98 Regression test for PSYNC2 issue #3899 added.
Experimentally verified that it can trigger the issue reverting the fix.
At least on my system... Being the bug time/backlog dependant, it is
very hard to tell if this test will be able to trigger the problem
consistently, however even if it triggers the problem once in a while,
we'll see it in the CI environment at http://ci.redis.io.
2017-04-28 10:37:07 +02:00
c861e1e1ee Defrag: test currently disabled, too many false positives.
Related to #3786.
2017-04-22 15:59:57 +02:00
a17390853d Defrag: fix test false positive.
Apparently 1.4 is too low compared to what you get in certain setups
(including mine). I raised it to 1.55 that hopefully is still enough to
test that the fragmentation went down from 1.7 but without incurring in
issues, however the test setup may be still fragile so certain times this
may lead to false positives again, it's hard to test for these things
in a determinsitic way.

Related to #3786.
2017-04-22 13:21:41 +02:00
0fb5c4ebd8 add test for active defrag 2017-04-22 13:17:09 +02:00
3f068b92b9 Test: fix, hopefully, false PSYNC failure like in issue #2715.
And many other related Github issues... all reporting the same problem.
There was probably just not enough backlog in certain unlucky runs.
I'll ask people that can reporduce if they see now this as fixed as
well.
2017-04-14 17:53:11 +02:00
4acb4da1d1 add LFU policies to the test suite, just for coverage 2017-03-15 01:05:15 -07:00
95883313b5 Solaris fixes about tail usage and atomic vars.
Testing with Solaris C compiler (SunOS 5.11 11.2 sun4v sparc sun4v)
there were issues compiling due to atomicvar.h and running the
tests also failed because of "tail" usage not conform with Solaris
tail implementation. This commit fixes both the issues.
2017-02-22 13:08:21 +01:00
2b36706a48 Test: replication-psync, wait more to detect write load.
Slow systems like the original Raspberry PI need more time
than 5 seconds to start the script and detect writes.
After fixing the Raspberry PI can pass the unit without issues.
2017-02-22 12:27:01 +01:00
7c8ddab4f8 Test: fix conditional execution of HINCRBYFLOAT representation test. 2017-02-22 12:00:09 +01:00