Commit Graph

5626 Commits

Author SHA1 Message Date
073293693e RESP3: Use new deferred len API in server.c. 2019-01-09 17:00:29 +01:00
57c5a766a2 RESP3: Aggregate deferred lengths functions. 2019-01-09 17:00:29 +01:00
914ee43108 RESP3: Double replies and aggregate lengths initial functions. 2019-01-09 17:00:29 +01:00
14400d073b Merge pull request #5729 from artix75/cluster_manager_fix_cmd
Cluster Manager del-node: use CLUSTER RESET in place of SHUTDOWN
2019-01-09 10:11:27 +01:00
30d8d05cd6 Update ae.c
Update comment
2019-01-06 15:01:25 +08:00
2925bdc63b Add comment explaining negative repeat 2019-01-02 19:28:04 +00:00
2f6ed9333f Fix broken interval and repeat bahaviour in redis-cli (incluing cluster mode)
This addresses two problems, one where infinite (negative) repeat count is broken for all types for Redis,
and another specific to cluster mode where redirection is needed.

Now allows and works correctly for negative (i.e. -1) repeat values passed with `-r` argument to redis-cli
as documented here https://redis.io/topics/rediscli#continuously-run-the-same-command which seems to have
regressed as a feature in 95b988 (though that commit removed bad integer wrap-around to `0` behaviour).

This broken behaviour exists currently (e50458), and redis-cli will just exit immediately with repeat `-r <= 0`
as opposed to send commands indefinitely as it should with `-r < 0`

Additionally prevents a repeat * interval seconds hang/time spent doing nothing at the start before issuing
commands in cluster mode (`-c`), where the command needed to redirect to a slot on another node, as commands
where failing and waiting to be reissued but this was fully repeated before being reissued. For example,

        redis-cli -c -r 10 -i 0.5 INCR test_key_not_on_6379

Would hang and show nothing for 5 seconds (10 * 0.5) before showing

        (integer) 1
        (integer) 2
        (integer) 3
        (integer) 4
        (integer) 5
        (integer) 6
        (integer) 7
        (integer) 8
        (integer) 9
        (integer) 10

at half second intervals as intended.
2019-01-02 18:50:58 +00:00
17797660f1 Cluster Manager del-node: use CLUSTER RESET in place of SHUTDOWN
See issue #5687
2018-12-27 17:20:42 +01:00
8a87de130f Modules shared API: export new core APIs. 2018-12-20 17:57:49 +01:00
d3eb0028e9 Modules shared API: also unregister the module as user. 2018-12-20 17:57:46 +01:00
9403b3d7a3 Modules shared API: prevent unloading of used modules. 2018-12-20 17:57:43 +01:00
6bb8cdaebe Modules shared API: unregister APIs function. 2018-12-20 17:57:40 +01:00
27f6e9bb9b Modules shared API: initial core functions.
Based on ideas and code in PR #5560 by @MeirShpilraien.
2018-12-20 17:57:35 +01:00
850b64c116 Revert shared APIs to modify the design. 2018-12-20 17:56:38 +01:00
ab37289fa6 added module ability to register api to be used by other modules 2018-12-20 17:55:18 +01:00
503fd229e4 Cluster Manager: enable --cluster-replace also for 'fix' command. 2018-12-19 17:29:25 +01:00
cc29590188 Fixed memory leak in clusterManagerCompareKeysValues. 2018-12-18 18:45:10 +01:00
143bfa1e6e Cluster Manager: compare key values after BUSYKEY error (migration).
If a key exists in the target node during a migration (BUSYKEY),
the value of the key on both nodes (source and target) will be compared.
If the key has the same value on both keys, the migration will be
automatically retried with the REPLACE argument in order to override
the target's key.

If the key has different values, the behaviour will depend on such
cases:
- In case of 'fix' command, the migration will stop and the user
  will be warned to manually check the key(s).
- In other cases (ie. reshard), if the user launched the command
  with the --cluster-replace option, the migration will be
  retried with the REPLACE argument, elsewhere the migration will
  stop and the user will be warned.
2018-12-18 17:45:35 +01:00
ed88f77d6d Check server.verbosity in RM_LogRaw 2018-12-13 13:57:38 +01:00
d935cfcb89 Cluster Manager: avoid using reply error messages to check slot status.
Slot assignment status is now checked by using CLUSTER SLOTS.
Furthermore, one memory leak has been fixed.
2018-12-12 13:34:43 +01:00
129f2d2746 freeMemoryIfNeeded() small refactoring.
Related to issue #5686 and PR #5689.
2018-12-12 11:37:15 +01:00
7ae184bfea Merge pull request #5689 from soloestoy/donot-evict-when-AOF-loading
evict: don't care about mem if loading
2018-12-12 11:29:10 +01:00
03e2bb0cfd Crashing is too much in addReplyErrorLength().
See #5663.
2018-12-11 17:50:18 +01:00
b9cd89d108 evict: don't care about mem if loading
When loading data, we call processEventsWhileBlocked
to process events and execute commands.
But if we are loading AOF it's dangerous, because
processCommand would call freeMemoryIfNeeded to evict,
and that will break data consistency, see issue #5686.
2018-12-12 00:25:58 +08:00
0110e46f6e Merge branch 'unstable' of github.com:/antirez/redis into unstable 2018-12-11 13:30:04 +01:00
a31ca8d753 stringmatchlen() fuzz test added.
Verified to be able to trigger at least #5632. Does not report other
issues.
2018-12-11 13:29:30 +01:00
c710d4afdc Fix stringmatchlen() read past buffer bug.
See #5632.
2018-12-11 13:18:52 +01:00
f77edf4234 Merge pull request #5665 from louiszhw/unstable
fix comments fault discription
2018-12-11 13:03:09 +01:00
e8529d1b1e Merge pull request #4264 from lsytj0413/unstable
fix a typo: craeted -> created
2018-12-11 13:02:28 +01:00
6100be7d82 fix typo 2018-12-11 19:53:54 +08:00
1530c0a7dd multi: ignore multiState's cmd_flags when loading AOF 2018-12-11 19:47:36 +08:00
274531396c Reject EXEC containing write commands against RO replica.
Thanks to @soloestoy for discovering this issue in #5667.
This is an alternative fix in order to avoid both cycling the clients
and also disconnecting clients just having valid read-only transactions
pending.
2018-12-11 11:39:21 +01:00
27ddb2ba3a Cluster Manager:
- Multiple owners checking in 'fix'/'check' commands is now
  optional (using --cluster-search-multiple-owners).
- Updated help.
2018-12-10 18:01:18 +01:00
0c1336caf4 Cluster Manager:
- FixOpenSlot now correctly updates in-memory cluster configuration.
    - Improved output messages.
2018-12-10 17:43:58 +01:00
1a56fc913e Cluster Manager: 'fix' command now handles open slots with migrating state
in one node and importing state in multiple nodes.
2018-12-10 17:43:58 +01:00
d5f7703367 Cluster Manager: setting new slot owner is now handled atomically
in 'fix' command.
2018-12-10 17:43:58 +01:00
eaac9f9e93 Cluster Manager: code cleanup. 2018-12-10 17:43:58 +01:00
5bf13eaaf8 Cluster Manager: check/fix commands now handle multiple owners even if
all slots are covered and not open.
2018-12-10 17:39:54 +01:00
5bfd8ae253 Merge pull request #5626 from soloestoy/remove-useless-code
remove useless tryObjectEncoding in debug assert
2018-12-07 17:09:56 +01:00
03629ba0b6 Merge pull request #5633 from oranagra/frag_bytes_signed
fix #5580, display fragmentation and rss overhead bytes as signed
2018-12-07 17:09:10 +01:00
cdab4c3e09 Merge branch 'unstable' of github.com:/antirez/redis into unstable 2018-12-07 17:07:14 +01:00
7e0cc2bb91 Remove no longer relevant comment in processCommand(). 2018-12-07 17:06:55 +01:00
c6341ce373 Merge pull request #5673 from soloestoy/check-current-client-after-freememory
networking: current_client should not be NULL when trim qb_pos
2018-12-07 17:03:48 +01:00
5a0b7212c9 DEBUG DIGEST-VALUE implemented. 2018-12-07 16:41:54 +01:00
e9400e8efd DEBUG DIGEST refactoring: extract function to digest a value. 2018-12-07 16:30:33 +01:00
28c4281495 networking: current_client should not be NULL when trim qb_pos 2018-12-07 19:14:33 +08:00
74f942cfa5 redis-cli reshard/rebalance: ability to force replacement on existing keys 2018-12-07 14:14:11 +03:00
9f87ef9399 Merge pull request #5460 from krallin/env-password
cli: pass auth through REDISCLI_AUTH
2018-12-07 11:30:07 +01:00
75c181ee2b Merge pull request #5664 from yongman/fix-rediscli-output-format
Fix cluster call reply format readable
2018-12-07 11:28:18 +01:00
6aa9606995 fix a typo: craeted -> created 2018-12-06 11:08:59 +08:00