summaryrefslogtreecommitdiff
path: root/src/redis-trib.rb
Commit message (Collapse)AuthorAgeFilesLines
* Redis-trib deprecated: it no longer works and itartix2018-07-131-1804/+103
| | | | outputs a warning to the user.
* Fix typoJack Drogon2018-07-031-6/+6
|
* Cluster: improve anti-affinity algo in redis-trib.rb.antirez2018-01-181-1/+131
| | | | | | | See #3462 and related PRs. We use a simple algorithm to calculate the level of affinity violation, and then an optimizer that performs random swaps until things improve.
* Refactor redis-trib.rbyyoshiki412016-10-101-2/+1
|
* Display the nodes summary once the cluster is established using redis-trib.rbrojingeorge2016-06-231-0/+5
| | | | | | | | | | Display the nodes summary once the cluster is established using redis-trib.rb After the cluster meet and join was done, when the summary was shown, it was giving info regarding the nodes. This fix ensures that confusion where the slaves were shown as masters. Fix would be to reset the nodes and reload the cluster information before checking the cluster status after creating it.
* Merge pull request #3152 from be-hase/fix/check_open_slotsSalvatore Sanfilippo2016-05-051-6/+7
|\ | | | | Fix redis-trib.rb
| * fix variableRyosuke Hasebe2016-03-301-5/+5
| |
| * fix check_open_slotsRyosuke Hasebe2016-03-301-1/+2
| |
* | Fix ae.c to avoid timers infinite loop.antirez2016-04-041-1/+1
|/ | | | | | | | | | | This fix was suggested by Anthony LaTorre, that provided also a good test case that was used to verify the fix. The problem with the old implementation is that, the time returned by a timer event (that is the time after it want to run again) is added to the event *start time*. So if the event takes, in order to run, more than the time it says it want to be scheduled again for running, an infinite loop is triggered.
* Cluster: redis-trib: support @busport format in ClusterNode.antirez2016-02-021-1/+1
|
* Cluster: fix rebalancing to always empty nodes.antirez2016-01-131-3/+24
| | | | | | | Because of rounding error even with weight=0 sometimes a node was left with an assigned slot. Close #3001.
* Cluster: redis-trib move_to_slot: don't send SETSLOT to slaves.antirez2016-01-121-0/+1
|
* Cluster: fix redis-trib reference of variable in warning.antirez2016-01-111-1/+1
|
* CLUSTER BUMPEPOCH initial implementation fixed.antirez2016-01-111-7/+18
|
* Cluster: implement redis-trib fix when slot is open without owners.antirez2016-01-111-9/+39
| | | | Still work to do.
* Cluster: implement redis-trib fix for uncovered slots.antirez2016-01-111-9/+32
|
* redis-trib: Remove duplicated key in hash initialization.antirez2016-01-021-1/+1
|
* Cluster: rebalance now supports --threshold option.antirez2015-12-181-2/+24
|
* Cluster: redis-trib reshard / rebalance --pipeline support.antirez2015-12-181-5/+21
|
* Cluster: allows abbreviated node IDs with rebalance --weight option.antirez2015-12-151-3/+19
|
* Cluster: rebalancing option --simulate, and a fix.antirez2015-12-151-8/+12
|
* Cluster: redis-trib rebalance initial implementation.antirez2015-12-151-17/+154
|
* Initial implementation of redis-trib info subcommand.antirez2015-12-141-0/+22
|
* Cluster: redis-trib: use variadic MIGRATE.antirez2015-12-111-15/+13
| | | | | | | | | | | | | | | | We use the new variadic/pipelined MIGRATE for faster migration. Testing is not easy because to see the time it takes for a slot to be migrated requires a very large data set, but even with all the overhead of migrating multiple slots and to setup them properly, what used to take 4 seconds (1 million keys, 200 slots migrated) is now 1.6 which is a good improvement. However the improvement can be a lot larger if: 1. We use large datasets where a single slot has many keys. 2. By moving more than 10 keys per iteration, making this configurable, which is planned. Close #2710 Close #2711
* Cluster: redis-trib migrate default timeout set to 60 sec.antirez2015-12-111-1/+1
|
* redis-trib.rb: --timeout XXXXX option added to fix and reshard commands. ↵daniele2015-12-111-4/+10
| | | | Defaults to 15000 milliseconds
* Add back blank lineDavid Thomson2015-10-141-0/+1
|
* Update import command to optionally use copy and replace parametersDavid Thomson2015-10-141-3/+7
|
* Cluster: redis-trib fix, coverage for migrating=1 case.antirez2015-10-091-2/+12
| | | | Kinda related to #2770.
* Remove end of line whitespace from redis-tribMatt Stancliff2015-01-081-6/+6
|
* Fix redis-trib cluster createMatt Stancliff2015-01-081-2/+11
| | | | | Under certain conditions the node list wasn't being fully populated and 'create' would fail trying to call methods on nil objects.
* Improve redis-trib replica assignmentMatt Stancliff2014-12-191-25/+42
| | | | | | | This tiny bit of code has gone through so many revisions. Hopefully it's more correct now. Fixes #2204
* Merge pull request #2107 from mattsta/fix-trib-importSalvatore Sanfilippo2014-12-111-1/+1
|\ | | | | Fix redis-trib import SCAN call
| * Fix redis-trib import SCAN callMatt Stancliff2014-10-291-1/+1
| |
* | Fix redis-trib.rb IP:Port disassembly for IPv6Matt Stancliff2014-10-291-5/+7
|/ | | | | | IP format is now any of: - 127.0.0.1:6379 - ::1:6379
* redis-trib should not abort easily on connection issues.antirez2014-09-261-2/+7
|
* Cluster: fix redis-trib --from all.antirez2014-07-211-0/+4
|
* redis-trib: allow to reshard in non-interactive way.antirez2014-07-181-37/+82
| | | | | | The introduction of --from --to --slots --yes options allow to reshard from cli in an automated way from scripts. The code is ugly and needs refactoring as soon as we get it in RC / stable release.
* Fix an error in redis-trib where we always talk with same node.antirez2014-05-211-1/+3
| | | | | While iterating the list of nodes we want to set the slot as stable in the current node, not always in the first node of the list.
* redis-trib fix improved: move keys from N nodes to owner.antirez2014-05-211-15/+51
|
* redis-trib fix: use MIGRATE REPLACE when fixing slots.antirez2014-05-211-2/+13
| | | | This fixes issue #1765.
* redis-trib create: use CONFIG SET-CONFIG-EPOCH before joining the cluster.antirez2014-05-121-0/+18
| | | | | | This way there is no need for the conflict resolution algo to be used in order to start with a cluster where each node has a different configEpoch.
* redis-trib import: trap MIGRATE errors.antirez2014-05-121-2/+9
|
* redis-trib.rb: MIGRATE hardcoded timeout set to 15 sec.antirez2014-05-121-2/+2
| | | | | | Will be configurable / adaptive at some point but let's start with a saner value compared to 1 sec which is not a good idea for big data structures stored into a single key.
* Cluster: initial ability to import data from standalone instance.antirez2014-05-101-7/+141
|
* redis-trib: allow support for mandatory options.antirez2014-05-091-0/+8
|
* Cluster: redis-trib cluster allocation more even across nodes.antirez2014-03-251-6/+10
| | | | | | | | | | | redis-trib used to allocate slots not considering fractions of nodes when computing the slots_per_node amount. So the fractional part was carried over till the end of the allocation, where the last node received a few more slots than any other (or a lot more if the cluster was composed of many nodes). The computation was changed to allocate slots more evenly when they are not exactly divisible for the number of masters we have.
* Merge pull request #1629 from mattsta/fix-trib-master-assignmentSalvatore Sanfilippo2014-03-241-0/+1
|\ | | | | Cluster: Restore proper trib master iteration
| * Cluster: Restore proper trib master iterationMatt Stancliff2014-03-241-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This got removed in 2e5c394 during a new feature addition. The prior commit had "break if masters.length == masters_count" but we are guaranteed to aready have that condition met since otherwise we would haven't gotten this far. Without this break statement, it's possible some masters may be forgotten and have zero replicas while other masters have more than their requested number of replicas. Thanks to carlos for pointing out this regression at: https://groups.google.com/forum/#!topic/redis-db/_WVVqDw5B7c
* | Cluster: Fix trib create when masters==replicasMatt Stancliff2014-03-241-8/+22
|/ | | | | | | | | | | | | | | | | | | | | | | | | | This bug was introduced in 2e5c394f during a refactor. It took me a while to understand what was going on with the code, so I've refactored it further by: - Replacing boolean values with meaningful symbols - Replacing 'i' with a meaningful variable name - Adding the proper abort check - Factoring out now duplicated conditionals - Adding optional verbose logging (we're inside *four* different looping constructs, so it takes a while to figure out where all the moving parts are) - Updating comment for the section This fixes a problem when the number of master instances equaled the number of replica instances. Before, when there were equal numbers of both, nodes_count would go to zero, but the while loop would spin in i < @replicas because i would never be updated (because the nodes_list of each ip was length == 0, which triggered an endless loop of next -> i = 0 -> 0 < 1? -> true -> next -> i = 0 ...) Thanks to carlo who found this problem at: https://groups.google.com/forum/#!topic/redis-db/_WVVqDw5B7c