390 Commits

Author SHA1 Message Date
artix
5b72ead0ee Cluster Manager: change text alert clusterManagerWaitForClusterJoin 2019-02-28 16:57:57 +01:00
artix
48d7f54aae Cluster Manager: code cleanup 2019-02-28 16:57:57 +01:00
artix
391caf8962 Cluster Manager: fix bus error in clusterManagerGetLinkStatus 2019-02-28 16:57:57 +01:00
Artix
0b6b8553a7 Cluster Manager: fix memory leaks in clusterManagerGetDisconnectedLinks 2019-02-28 16:57:57 +01:00
artix
1269590dd9 Cluster Manager: fix memory leak in clusterManagerWaitForClusterJoin 2019-02-28 16:57:57 +01:00
artix
d1aabe177a Cluster Manager: improve join issue checking 2019-02-28 16:57:57 +01:00
artix
b4a800b61e Cluster Manager: check for unreachable nodes during cluster join. 2019-02-28 16:57:57 +01:00
Salvatore Sanfilippo
62fe3057c5 Merge pull request #5850 from artix75/dev
Cluster Manager: fix replica assignment anti-affinity (create)
2019-02-22 10:28:31 +01:00
Salvatore Sanfilippo
e7d1af804e Merge pull request #4811 from oranagra/cli-diskless-repl
Add redis-cli support for diskless replication (CAPA EOF)
2019-02-21 12:54:15 +01:00
Oran Agra
6f84cf009b redis-cli add support for --memkeys, fix --bigkeys for module types
* bigkeys used to fail on databases with module type keys
* new code adds more types when it discovers them, but has no way to know element count in modules types yet
* bigkeys was missing XLEN command for streams
* adding --memkeys and --memkeys-samples to make use of the MEMORY USAGE command

see #5167, #5175
2019-02-21 12:18:20 +02:00
artix
da852aa8b1 Cluster Manager: fix replica assigment anti-affinity (create)
Fix issue #5849
2019-02-20 15:36:15 +01:00
artix
ed341848b3 Cluster Manager: remove unused code elements 2019-01-24 17:29:44 +01:00
Salvatore Sanfilippo
040d1ab3f0 Merge pull request #5743 from AngusP/forever-repeat-cli
Redis CLI: Fix broken interval and repeat behaviour (incluing in cluster mode)
2019-01-22 17:29:37 +01:00
Zhicheng Wei
f0b6798c75 fix clusterManagerGetAntiAffinityScore double free otypes 2019-01-19 11:38:36 +08:00
antirez
a55a23a09e RESP3: redis-cli support for boolean in TTY output. 2019-01-09 17:00:30 +01:00
antirez
1ef5342d37 RESP3: redis-cli: show the double as received from Redis. 2019-01-09 17:00:30 +01:00
antirez
1ba5f3222d RESP3: hiredis: initial double implementation. 2019-01-09 17:00:30 +01:00
antirez
02f34842d7 RESP3: hiredis: map and set display for TTY output. 2019-01-09 17:00:30 +01:00
Angus Pearson
462396d594 Add comment explaining negative repeat 2019-01-02 19:28:04 +00:00
Angus Pearson
d5facb4753 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
artix
94f6693395 Cluster Manager del-node: use CLUSTER RESET in place of SHUTDOWN
See issue #5687
2018-12-27 17:20:42 +01:00
artix
6c20ebbbb6 Cluster Manager: enable --cluster-replace also for 'fix' command. 2018-12-19 17:29:25 +01:00
artix
de69c77451 Fixed memory leak in clusterManagerCompareKeysValues. 2018-12-18 18:45:10 +01:00
artix
8bcade7cfa 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
artix
da1fc5e7e4 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
artix
4d2e9f9004 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
artix
08c05082fd Cluster Manager:
- FixOpenSlot now correctly updates in-memory cluster configuration.
    - Improved output messages.
2018-12-10 17:43:58 +01:00
artix
41535a5003 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
artix
d066613606 Cluster Manager: setting new slot owner is now handled atomically
in 'fix' command.
2018-12-10 17:43:58 +01:00
artix
e2d620cd04 Cluster Manager: code cleanup. 2018-12-10 17:43:58 +01:00
artix
eeaddda237 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
yura
041e368090 redis-cli reshard/rebalance: ability to force replacement on existing keys 2018-12-07 14:14:11 +03:00
Salvatore Sanfilippo
d0383c6b82 Merge pull request #5460 from krallin/env-password
cli: pass auth through REDISCLI_AUTH
2018-12-07 11:30:07 +01:00
yongman
00beb60aaa Fix cluster call reply format readable 2018-12-04 17:36:42 +08:00
yongman
ff4a59c87d fix typo 2018-11-23 23:51:16 +08:00
yongman
dd759108d3 Fix choose a random master node for slot assignment 2018-11-23 16:58:55 +08:00
yongman
3196f40c0c skip slave nodes when sending cluster setslot command 2018-11-21 23:01:35 +08:00
yongman
1bf2f11821 Fix pointer access and memory leak in redis-cli. 2018-11-16 17:27:27 +08:00
Salvatore Sanfilippo
1d13cd12b2 Merge pull request #5529 from yongman/fix-rediscli-malloc
fix zmalloc in clusterManagerComputeReshardTable
2018-11-06 12:05:24 +01:00
yongman
11eba37923 fix malloc in clusterManagerComputeReshardTable 2018-11-06 10:51:19 +08:00
artix
8475a6c5c4 Cluster Manager: removed unused var. 2018-11-05 14:19:45 +01:00
artix
acc17f2c5a Cluster Manager: further improvements to "fix":
- clusterManagerFixOpenSlot: ensure that the
  slot is unassigned before ADDSLOTS
- clusterManagerFixSlotsCoverage: after cold
  migration, the slot configuration
  is now updated on all the nodes.
2018-11-05 14:15:31 +01:00
artix
35af3fa1d9 Cluster Manager: fixed string parsing issue in clusterManagerGetConfigSignature 2018-11-05 14:15:22 +01:00
artix
1167734c70 Cluster Manager: better fix subcommand. 2018-11-05 14:15:12 +01:00
artix
91b5772dce Cluster Manager: fixed typos in comments. 2018-11-05 14:15:01 +01:00
artix
2ed5381e4a Cluster Manager: fixed 'DELSLOT' subcommand typo. 2018-11-05 14:14:45 +01:00
Thomas Orozco
1470fb5a6d cli: pass auth through REDISCLI_AUTH
This adds support for passing a password through a REDISCLI_AUTH
environment variable (which is safer than the CLI), which might often be
safer than passing it through a CLI argument.

Passing a password this way does not trigger the warning about passing a
password through CLI arguments, and CLI arguments take precedence over
it.
2018-10-19 19:15:14 +02:00
artix
42f13e279b Cluster Manager: clusterManagerFixOpenSlot now counts node's keys in slot
if node is neither migrating nor importing.
2018-09-17 16:26:46 +02:00
antirez
7f73de385a Revert "fix repeat argument issue and reduce unnessary loop times for redis-cli."
Reverts commit 4f0a0b597306162b3e62eb8e608e3a42c126f03e
since the commit introduced the very serious bug issue #5286.
2018-09-17 16:24:07 +02:00
antirez
c1728940a0 LOLWUT: show the output verbatim in redis-cli. 2018-09-11 16:29:31 +02:00