741 Commits

Author SHA1 Message Date
John Sully
ec82755227 hrename tests
Former-commit-id: f77c227b2d34b7ec74c1fc993e03f063dcbfa090
2020-05-10 17:14:44 -04:00
John Sully
d3ebe3b6bd Merge tag '6.0-rc3' into redis_6_merge
Redis 6.0 RC3.


Former-commit-id: b2cb10de5f39b4d8e1ee19877c2bdaf19eefd9db
2020-04-14 22:56:19 -04:00
John Sully
02147b4be0 Merge commit '0f7dfc378ce5ab0524ac28b6142545bc41435386' into redis_6_merge
Former-commit-id: cc3ebbe5194e9744fb84ce490e90ac5fbe7f8716
2020-04-14 22:19:29 -04:00
John Sully
f27524674a Merge commit '973297336fc05a601e17be70aba88e5dca6480ae' into redis_6_merge
Former-commit-id: ef1236b6009ebd7b00f6dd2f43df57ad95e51253
2020-04-14 20:19:48 -04:00
John Sully
d57fa7c8f9 Merge commit '349aa24511253b3e323064b95cefb4414f31726c' into redis_6_merge
Former-commit-id: 28cbed1d13961c5568f2bdc50c6a23107d3434d0
2020-04-14 20:09:53 -04:00
John Sully
5dbcd55669 Merge commit '51c1a9f8fbc12a9276489178242e498bb6ccbdba' into redis_6_merge
Former-commit-id: 09e8fb17cd0889ad17461e48446221b3955f5a8f
2020-04-14 18:44:42 -04:00
John Sully
bd73ec5f1e Merge commit '6fe55c2f299bbb306533af39cb28346bf5d473d3' into redis_6_merge
Former-commit-id: d71c4c221580221c2c31b5e3b5d23bab50a544dc
2020-04-14 18:30:26 -04:00
Guy Benoish
a509400d58 Modules: Test MULTI/EXEC replication of RM_Replicate
Makse sure call() doesn't wrap replicated commands with
a redundant MULTI/EXEC

Other, unrelated changes:
1. Formatting compiler warning in INFO CLIENTS
2. Use CLIENT_ID_AOF instead of UINT64_MAX
2020-03-31 17:12:19 +02:00
Oran Agra
0f7dfc378c AOFRW on an empty stream created with MKSTREAM loads badkly
the AOF will be loaded successfully, but the stream will be missing,
i.e inconsistencies with the original db.

this was because XADD with id of 0-0 would error.

add a test to reproduce.
2020-03-31 16:57:20 +02:00
Guy Benoish
805c8c94a9 RENAME can unblock XREADGROUP
Other changes:
Support stream in serverLogObjectDebugInfo
2020-03-31 16:57:20 +02:00
antirez
97b80b57e9 Fix the propagate Tcl test after module changes. 2020-03-31 16:57:20 +02:00
John Sully
af459476ea Merge branch 'unstable' into redis_6_merge
Former-commit-id: 718aee242dd75abd16a5a6a89353d2a35f37b010
2020-03-25 15:47:12 -04:00
John Sully
d5c4d4999b Add roundtrip test for subkey expires
Former-commit-id: 56fc6b7deb59cfb3219d65c01c96969d3983e84a
2020-03-25 15:34:30 -04:00
Oran Agra
e43cd8316f MULTI/EXEC during LUA script timeout are messed up
Redis refusing to run MULTI or EXEC during script timeout may cause partial
transactions to run.

1) if the client sends MULTI+commands+EXEC in pipeline without waiting for
response, but these arrive to the shards partially while there's a busy script,
and partially after it eventually finishes: we'll end up running only part of
the transaction (since multi was ignored, and exec would fail).

2) similar to the above if EXEC arrives during busy script, it'll be ignored and
the client state remains in a transaction.

the 3rd test which i added for a case where MULTI and EXEC are ok, and
only the body arrives during busy script was already handled correctly
since processCommand calls flagTransaction
2020-03-25 15:55:24 +01:00
antirez
70a98a43ea Fix BITFIELD_RO test. 2020-03-25 15:55:24 +01:00
bodong.ybd
b3e4abf06e Added BITFIELD_RO variants for read-only operations. 2020-03-25 15:55:24 +01:00
antirez
61b98f32a2 Regression test for #7011. 2020-03-25 15:54:34 +01:00
John Sully
529b860f85 Merge branch 'unstable' into redis_6_merge
Former-commit-id: 1a7e2e663e0ebabdf51ec8b6bd50d8a4c8a611c8
2020-03-01 21:48:51 -05:00
John Sully
de3d796eb7 Update tests to reflect new CRON name (keydb.cron)
Former-commit-id: 83f585e30ab9d37408c79b74e2536664325a051f
2020-03-01 21:42:01 -05:00
Oran Agra
12626ce9bb fix race in module api test for fork
in some cases we were trying to kill the fork before it got created
2020-02-27 18:02:30 +01:00
Oran Agra
635321d47e fix github actions failing latency test for active defrag - part 2
it seems that running two clients at a time is ok too, resuces action
time from 20 minutes to 10. we'll use this for now, and if one day it
won't be enough we'll have to run just the sensitive tests one by one
separately from the others.

this commit also fixes an issue with the defrag test that appears to be
very rare.
2020-02-27 18:02:30 +01:00
Oran Agra
0b988fa9ec fix github actions failing latency test for active defrag
seems that github actions are slow, using just one client to reduce
false positives.

also adding verbose, testing only on latest ubuntu, and building on
older one.

when doing that, i can reduce the test threshold back to something saner
2020-02-27 18:02:30 +01:00
Oran Agra
60096bc1a1 Fix latency sensitivity of new defrag test
I saw that the new defag test for list was failing in CI recently, so i
reduce it's threshold from 12 to 60.

besides that, i add / improve the latency test for that other two defrag
tests (add a sensitive latency and digest / save checks)

and fix bad usage of debug populate (can't overrides existing keys).
this was the original intention, which creates higher fragmentation.
2020-02-27 18:02:30 +01:00
Oran Agra
349aa24511 Defrag big lists in portions to avoid latency and freeze
When active defrag kicks in and finds a big list, it will create a bookmark to
a node so that it is able to resume iteration from that node later.

The quicklist manages that bookmark, and updates it in case that node is deleted.

This will increase memory usage only on lists of over 1000 (see
active-defrag-max-scan-fields) quicklist nodes (1000 ziplists, not 1000 items)
by 16 bytes.

In 32 bit build, this change reduces the maximum effective config of
list-compress-depth and list-max-ziplist-size (from 32767 to 8191)
2020-02-27 18:00:47 +01:00
Guy Benoish
b4ddc7b7ba XGROUP DESTROY should unblock XREADGROUP with -NOGROUP 2020-02-27 18:00:47 +01:00
antirez
b7cb28d501 Tracking: first set of tests for the feature. 2020-02-27 18:00:46 +01:00
antirez
51c1a9f8fb ACL LOG: make max log entries configurable. 2020-02-12 14:15:35 +01:00
antirez
ea1e1b12c9 ACL LOG: test for AUTH reason. 2020-02-12 14:15:35 +01:00
antirez
9f6e84f6be ACL LOG: implement a few basic tests. 2020-02-12 14:15:35 +01:00
John Sully
ee99605def Merge branch 'unstable' into redis_6_merge
Former-commit-id: 18a5f46b6138e8a975dda0ed4897d19eed756d24
2020-02-11 02:39:08 -05:00
John Sully
9cd3b8253d Ensure multi-master works for ring topologies
Former-commit-id: a7cc3aac28ccec4dadb80aa2cc7279c53982bc28
2020-02-10 00:25:03 -05:00
John Sully
e05f9de395 Merge branch 'unstable' of https://github.com/JohnSully/KeyDB into unstable
Former-commit-id: 339631530a5e18af7ad53f1a3df03d24085f9450
2020-02-09 02:25:20 -05:00
John Sully
6d25bd9f47 Addmissing test file
Former-commit-id: fb2bdf7d05e27b15dcb53b09d6820416a99a3ba7
2020-02-08 16:49:41 -05:00
John Sully
70cb1df72a merge 5.0 unstable
Former-commit-id: c45f1328ac82fa9ebc8731314b40bd059ea45b6f
2020-02-07 16:45:59 -05:00
John Sully
a21c81c30e Add test to detect issue #137 and #132
Former-commit-id: 49d86746edef497a568c6f3a64695d420305cca8
2020-02-06 23:31:12 -05:00
Guy Benoish
6fe55c2f29 ld2string should fail if string contains \0 in the middle
This bug affected RM_StringToLongDouble and HINCRBYFLOAT.
I added tests for both cases.

Main changes:
1. Fixed string2ld to fail if string contains \0 in the middle
2. Use string2ld in getLongDoubleFromObject - No point of
   having duplicated code here

The two changes above broke RM_SaveLongDouble/RM_LoadLongDouble
because the long double string was saved with length+1 (An innocent
mistake, but it's actually a bug - The length passed to
RM_SaveLongDouble should not include the last \0).
2020-02-04 10:23:48 +01:00
Guy Benoish
40295fb3fe Modules: Fix blocked-client-related memory leak
If a blocked module client times-out (or disconnects, unblocked
by CLIENT command, etc.) we need to call moduleUnblockClient
in order to free memory allocated by the module sub-system
and blocked-client private data

Other changes:
Made blockedonkeys.tcl tests a bit more aggressive in order
to smoke-out potential memory leaks
2020-02-04 10:23:48 +01:00
WuYunlong
d2509811b7 Add tcl regression test in scripting.tcl to reproduce memory leak. 2020-02-04 10:23:48 +01:00
John Sully
8a86276a86 cron reliability
Former-commit-id: c24a7c03c207d5e6ad95ef8958c0cfb118c1b593
2020-01-27 18:31:02 -05:00
John Sully
39378f982e Fix most tests (still some failures)
Former-commit-id: da83e841255487efe0e4b13d42b2dcc55a369838
2020-01-27 18:16:19 -05:00
John Sully
8e5fe97525 Merge remote-tracking branch 'redis/6.0' into redis_merge
Former-commit-id: ef9a3cadcf94326bf2f163db7698aad9a3c01690
2020-01-27 02:55:48 -05:00
John Sully
262b9a5d92 Initial implementation of the CRON command
Former-commit-id: 3204a39ada15ec33ac7926dc8b8f0e1875b99acb
2020-01-21 19:50:28 -05:00
Guy Benoish
1b5bf40c20 Blocking XREAD[GROUP] should always reply with valid data (or timeout)
This commit solves the following bug:
127.0.0.1:6379> XGROUP CREATE x grp $ MKSTREAM
OK
127.0.0.1:6379> XADD x 666 f v
"666-0"
127.0.0.1:6379> XREADGROUP GROUP grp Alice BLOCK 0 STREAMS x >
1) 1) "x"
   2) 1) 1) "666-0"
         2) 1) "f"
            2) "v"
127.0.0.1:6379> XADD x 667 f v
"667-0"
127.0.0.1:6379> XDEL x 667
(integer) 1
127.0.0.1:6379> XREADGROUP GROUP grp Alice BLOCK 0 STREAMS x >
1) 1) "x"
   2) (empty array)

The root cause is that we use s->last_id in streamCompareID
while we should use the last *valid* ID
2020-01-10 13:16:14 +01:00
John Sully
fc4d9e6d1f subkey expire testes
Former-commit-id: 0cf3af6857c192bd03656c28b5a0a2bb11416b8c
2020-01-03 16:50:13 -05:00
Guy Benoish
cddf1da2e9 Stream: Handle streamID-related edge cases
This commit solves several edge cases that are related to
exhausting the streamID limits: We should correctly calculate
the succeeding streamID instead of blindly incrementing 'seq'
This affects both XREAD and XADD.

Other (unrelated) changes:
Reply with a better error message when trying to add an entry
to a stream that has exhausted last_id
2019-12-29 15:46:31 +01:00
Oran Agra
52ea44e53b config.c adjust config limits and mutable
- make lua-replicate-commands mutable (it never was, but i don't see why)
- make tcp-backlog immutable (fix a recent refactory mistake)
- increase the max limit of a few configs to match what they were before
the recent refactory
2019-12-29 15:46:31 +01:00
antirez
e6e58e455c Revert "Geo: output 10 chars of geohash, not 11."
This reverts commit 009862ab7eee394061eeaf1aa187fa339ca50be4.
2019-12-18 12:54:46 +01:00
zhaozhao.zz
24044f3356 add a new SET option KEEPTTL that doesn't remove expire time 2019-12-18 15:20:36 +08:00
Madelyn Olson
034dcf185c Add module APIs for custom authentication 2019-12-17 06:59:59 +00:00
Yossi Gottlieb
0283db5883 Improve RM_ModuleTypeReplaceValue() API.
With the previous API, a NULL return value was ambiguous and could
represent either an old value of NULL or an error condition. The new API
returns a status code and allows the old value to be returned
by-reference.

This commit also includes test coverage based on
tests/modules/datatype.c which did not exist at the time of the original
commit.
2019-12-12 18:50:11 +02:00