merge remote

v4
vinllen 6 years ago
commit a9aa273696
  1. 5
      ChangeLog
  2. 6
      README.md
  3. 4
      conf/redis-shake.conf
  4. 8
      src/redis-shake/metric/variables.go
  5. 2
      src/redis-shake/restore.go

@ -1,8 +1,11 @@
2019-04-21 Alibaba Cloud.
2019-05-08 Alibaba Cloud.
* VERSION: 1.6.0
* FEATURE: source address supports cluster.
* FEATURE: target address supports several proxies to write data in
a round-robin way.
2019-05-11 Alibaba Cloud.
* VERSION: 1.4.3
* BUGFIX: add add metric in restore mode.
2019-04-24 Alibaba Cloud.
* VERSION: 1.4.2
* IMPROVE: improve rump to support fetching data from given keys in

@ -40,9 +40,9 @@ m
# Redis Type
---
Both the source and target type can be single redis, master-slave architecture redis, redis cluster and codis. Although the architecture patterns of different vendors are different for the cluster architecture, we still support different cloud vendors like alibaba-cloud, tencent-cloud and so on.<br>
If the target is open source redis cluster, redis-shake uses [redis-go-cluster](https://github.com/chasex/redis-go-cluster) driver to write data, otherwise, [redigo](https://github.com/garyburd/redigo) driver is used to insert data in round robin way.<br>
If the source is redis cluster, redis-shake launches multiple goroutines for parallel pull. User can control the concurrency.<br>
Both the source and target type can be standalone, opensource cluster and proxy. Although the architecture patterns of different vendors are different for the cluster architecture, we still support different cloud vendors like alibaba-cloud, tencent-cloud and so on.<br>
If the target is open source redis cluster, redis-shake uses [redis-go-cluster](https://github.com/chasex/redis-go-cluster) driver to write data. When target type is proxy, redis-shakes write data in round-robin way.<br>
If the source is redis cluster, redis-shake launches multiple goroutines for parallel pull. User can use `rdb.parallel` to control the RDB syncing concurrency.<br>
The "move slot" operations must be disabled on the source side.<br>
# Code branch rules

@ -70,11 +70,11 @@ rdb.input = local
# ${output_rdb}.0, ${output_rdb}.1, ${output_rdb}.2
rdb.output = local_dump
# the concurrence of fetching data, default is len(source.address) or len(rdb.input).
# used in `dump`, `sync` and `restore`.
# used in `dump`, `sync` and `restore`. 0 means default.
# 拉取的并发度,如果是`dump`或者`sync`,默认是source.address中db的个数,`restore`模式默认len(rdb.input)。
# 假如db节点/输入的rdb有5个,但rdb.parallel=3,那么一次只会
# 并发拉取3个db的全量数据,直到某个db的rdb拉取完毕,才会拉取第4个db节点的rdb,以此类推。
rdb.parallel =
rdb.parallel = 0
# use for expire key, set the time gap when source and target timestamp are not the same.
# 用于处理过期的键值,当迁移两端不一致的时候,目的端需要加上这个值

@ -34,6 +34,14 @@ type MetricRest struct {
func NewMetricRest() []MetricRest {
detailMapList := runner.GetDetailedInfo().([]map[string]interface{})
if detailMapList == nil || len(detailMapList) == 0 {
return []{
MetricRest{
StartTime: utils.StartTime,
Status: base.Status,
},
}
}
total := utils.GetTotalLink()
ret := make([]MetricRest, total)

@ -9,13 +9,13 @@ import (
"fmt"
"io/ioutil"
"time"
"strconv"
"pkg/libs/atomic2"
"pkg/libs/log"
"pkg/redis"
"redis-shake/configure"
"redis-shake/common"
"strconv"
"redis-shake/base"
"sync"
)

Loading…
Cancel
Save