26 Commits

Author SHA1 Message Date
John Sully
f49d8f9adb Merge tag '6.2.1' into unstable
Former-commit-id: bfed57e3e0edaa724b9d060a6bb8edc5a6de65fa
2021-05-19 02:59:48 +00:00
Oran Agra
922b9833ee Fix recent test failures (#8386)
1. Valgrind leak in a recent change in a module api test
2. Increase treshold of a RESTORE TTL test
3. Change assertions to use assert_range which prints the values
2021-01-23 21:53:58 +02:00
John Sully
14daf6f909 Merge tag '6.0.8' into unstable
Former-commit-id: 4c7e4b91a6bb2034636856b608b8c386d07f5541
2020-09-30 19:47:55 +00:00
Mota
e637e1f02b Test:Fix invalid cases in hash.tcl and dump.tcl (#4611) 2020-08-12 10:25:24 +08:00
Oran Agra
da96665c04 RESTORE ABSTTL won't store expired keys into the db (#7472)
Similarly to EXPIREAT with TTL in the past, which implicitly deletes the
key and return success, RESTORE should not store key that are already
expired into the db.
When used together with REPLACE it should emit a DEL to keyspace
notification and replication stream.

(cherry picked from commit 1c35f8741baa0def2f87eeab17898c79f0147d11)
2020-07-20 21:08:26 +03:00
Oran Agra
1c35f8741b RESTORE ABSTTL won't store expired keys into the db (#7472)
Similarly to EXPIREAT with TTL in the past, which implicitly deletes the
key and return success, RESTORE should not store key that are already
expired into the db.
When used together with REPLACE it should emit a DEL to keyspace
notification and replication stream.
2020-07-10 10:02:37 +03:00
John Sully
c60bf228b4 fix race in test
Former-commit-id: 02e821530a402796697e63c68e768b563de0a3cb
2020-06-07 00:44:11 -04:00
antirez
28a026486d ACL: implement resetpass directive and adjust test. 2019-01-18 11:26:32 +01:00
antirez
c5fc1ba9f6 Test: avoid time related false positive in RESTORE test. 2018-10-13 14:17:11 +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
Jack Drogon
bae1d36e5d Fix typo 2018-07-03 18:19:46 +02: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
f33db219a6 Test: MIGRATE AUTH test added.
Related to #2507.
2018-01-09 18:49:19 +01:00
antirez
b5967cf2ab MIGRATE: test more corner cases. 2015-12-11 14:27:08 +01:00
antirez
c72ee4c632 Test: pipelined MIGRATE tests added. 2015-12-11 13:41:58 +01:00
Matt Stancliff
6abb134d6e Increase test size for migrating large values
Previously, the old test ran 5,000 loops and used about 500k.

With quicklist, storing those same 5,000 loops takes up 24k, so the
"large value check" failed!

This increases the test to 20,000 loops which makes the object dump 96k.
2015-01-02 11:16:09 -05:00
antirez
170a7dc749 Test: dump.tcl fixed for RESTORE new error msg. 2014-05-22 15:56:17 +02:00
antirez
e9786a3255 Test: regression for issues #1483. 2014-01-09 11:19:03 +01:00
antirez
db845c2818 Test: more MIGRATE tests. 2012-11-14 12:12:52 +01:00
antirez
280fce1099 Test: check if MIGRATE is caching connections. 2012-11-14 10:58:34 +01:00
antirez
7736dc2e0f COPY and REPLACE options for MIGRATE.
With COPY now MIGRATE does not remove the key from the source instance.
With REPLACE it uses RESTORE REPLACE on the target host so that even if
the key already eixsts in the target instance it will be overwritten.

The options can be used together.
2012-11-07 15:32:27 +01:00
antirez
dfeecba041 REPLACE option for RESTORE.
The REPLACE option deletes an existing key with the same name (if any)
and materializes the new one. The default behavior without RESTORE is to
return an error if a key already exists.
2012-11-07 10:57:23 +01:00
Alex Mitrofanov
33700ab2a7 Fixed RESTORE hash failure (Issue #532)
(additional commit notes by antirez@gmail.com):

The rdbIsObjectType() macro was not updated when the new RDB object type
of ziplist encoded hashes was added.

As a result RESTORE, that uses rdbLoadObjectType(), failed when a
ziplist encoded hash was loaded.
This does not affected normal RDB loading because in that case we use
the lower-level function rdbLoadType().

The commit also adds a regression test.
2012-06-02 10:24:27 +02:00
antirez
687fd6e971 More MIGRATE tests. 2012-04-03 15:10:51 +02:00
antirez
28d265901a MIGRATE test modified because the implementation changed. 2012-04-02 16:38:59 +02:00
antirez
264d58460b DUMP, RESTORE, MIGRATE tests. 2012-04-02 11:44:25 +02:00