diff --git a/.travis.yml b/.travis.yml index 84be92485..378a28d06 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,8 +2,8 @@ language: go go: - 1.4.3 - - 1.5.1 - 1.5.2 + - 1.5.3 install: - go get -u github.com/tools/godep diff --git a/Dockerfile b/Dockerfile index 3bf13e2e1..a5629b846 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,7 +6,7 @@ RUN apt-get clean RUN rm -rf /var/lib/apt/lists/* ENV GOPATH /gopath -ENV CODIS ${GOPATH}/src/github.com/wandoulabs/codis +ENV CODIS ${GOPATH}/src/github.com/CodisLabs/codis ENV PATH ${GOPATH}/bin:${PATH}:${CODIS}/bin COPY . ${CODIS} diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index e242d8241..0399ab723 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -1,6 +1,6 @@ { - "ImportPath": "github.com/wandoulabs/codis", - "GoVersion": "go1.5.2", + "ImportPath": "github.com/CodisLabs/codis", + "GoVersion": "go1.5.3", "Packages": [ "./..." ], diff --git a/README.md b/README.md index f08f12ae4..4a3fb134c 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ #Codis - Redis cluster solution supporting pipeline and scaling dynamically -[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/wandoulabs/codis?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) -[![Build Status](https://travis-ci.org/wandoulabs/codis.svg)](https://travis-ci.org/wandoulabs/codis) +[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/CodisLabs/codis?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) +[![Build Status](https://travis-ci.org/CodisLabs/codis.svg)](https://travis-ci.org/CodisLabs/codis) -Codis is a proxy based high performance Redis cluster solution written in Go. It is production-ready and widely used at [wandoujia.com](http://wandoujia.com) and many companies. You can see [Codis Releases](https://github.com/wandoulabs/codis/releases) for latest and most stable realeases. +Codis is a proxy based high performance Redis cluster solution written in Go. It is production-ready and widely used at [wandoujia.com](http://wandoujia.com) and many companies. You can see [Codis Releases](https://github.com/CodisLabs/codis/releases) for latest and most stable realeases. ##Compared with Twemproxy and Redis Cluster diff --git a/cmd/admin/admin.go b/cmd/admin/admin.go index 3d07a90c8..2f71ebb4b 100644 --- a/cmd/admin/admin.go +++ b/cmd/admin/admin.go @@ -10,11 +10,11 @@ import ( "path/filepath" "time" - "github.com/wandoulabs/codis/pkg/models" - "github.com/wandoulabs/codis/pkg/models/etcd" - "github.com/wandoulabs/codis/pkg/models/zk" - "github.com/wandoulabs/codis/pkg/utils" - "github.com/wandoulabs/codis/pkg/utils/log" + "github.com/CodisLabs/codis/pkg/models" + "github.com/CodisLabs/codis/pkg/models/etcd" + "github.com/CodisLabs/codis/pkg/models/zk" + "github.com/CodisLabs/codis/pkg/utils" + "github.com/CodisLabs/codis/pkg/utils/log" ) type cmdAdmin struct { diff --git a/cmd/admin/dashboard.go b/cmd/admin/dashboard.go index d72d40e90..1b35a9eb1 100644 --- a/cmd/admin/dashboard.go +++ b/cmd/admin/dashboard.go @@ -9,11 +9,11 @@ import ( "io/ioutil" "strconv" - "github.com/wandoulabs/codis/pkg/models" - "github.com/wandoulabs/codis/pkg/proxy" - "github.com/wandoulabs/codis/pkg/topom" - "github.com/wandoulabs/codis/pkg/utils" - "github.com/wandoulabs/codis/pkg/utils/log" + "github.com/CodisLabs/codis/pkg/models" + "github.com/CodisLabs/codis/pkg/proxy" + "github.com/CodisLabs/codis/pkg/topom" + "github.com/CodisLabs/codis/pkg/utils" + "github.com/CodisLabs/codis/pkg/utils/log" ) type cmdDashboard struct { diff --git a/cmd/admin/main.go b/cmd/admin/main.go index 1905749c8..c47b311b1 100644 --- a/cmd/admin/main.go +++ b/cmd/admin/main.go @@ -6,7 +6,7 @@ package main import ( "github.com/docopt/docopt-go" - "github.com/wandoulabs/codis/pkg/utils/log" + "github.com/CodisLabs/codis/pkg/utils/log" ) func main() { diff --git a/cmd/admin/proxy.go b/cmd/admin/proxy.go index ec53c9671..9fdd28ea6 100644 --- a/cmd/admin/proxy.go +++ b/cmd/admin/proxy.go @@ -8,10 +8,10 @@ import ( "fmt" "io/ioutil" - "github.com/wandoulabs/codis/pkg/models" - "github.com/wandoulabs/codis/pkg/proxy" - "github.com/wandoulabs/codis/pkg/utils" - "github.com/wandoulabs/codis/pkg/utils/log" + "github.com/CodisLabs/codis/pkg/models" + "github.com/CodisLabs/codis/pkg/proxy" + "github.com/CodisLabs/codis/pkg/utils" + "github.com/CodisLabs/codis/pkg/utils/log" ) type cmdProxy struct { diff --git a/cmd/dashboard/main.go b/cmd/dashboard/main.go index 618f76a60..74b2ce1a6 100644 --- a/cmd/dashboard/main.go +++ b/cmd/dashboard/main.go @@ -13,12 +13,12 @@ import ( "github.com/docopt/docopt-go" - "github.com/wandoulabs/codis/pkg/models" - "github.com/wandoulabs/codis/pkg/models/etcd" - "github.com/wandoulabs/codis/pkg/models/zk" - "github.com/wandoulabs/codis/pkg/topom" - "github.com/wandoulabs/codis/pkg/utils" - "github.com/wandoulabs/codis/pkg/utils/log" + "github.com/CodisLabs/codis/pkg/models" + "github.com/CodisLabs/codis/pkg/models/etcd" + "github.com/CodisLabs/codis/pkg/models/zk" + "github.com/CodisLabs/codis/pkg/topom" + "github.com/CodisLabs/codis/pkg/utils" + "github.com/CodisLabs/codis/pkg/utils/log" ) func main() { diff --git a/cmd/fe/assets/node_modules/angular-ui-bootstrap/package.json b/cmd/fe/assets/node_modules/angular-ui-bootstrap/package.json index d1a07fdce..39096d157 100644 --- a/cmd/fe/assets/node_modules/angular-ui-bootstrap/package.json +++ b/cmd/fe/assets/node_modules/angular-ui-bootstrap/package.json @@ -2,7 +2,7 @@ "_args": [ [ "angular-ui-bootstrap", - "/home/spinlock/.gopath/src/github.com/wandoulabs/codis/cmd/fe/assets" + "/home/spinlock/.gopath/src/github.com/CodisLabs/codis/cmd/fe/assets" ] ], "_from": "angular-ui-bootstrap@latest", @@ -32,7 +32,7 @@ "_shasum": "d96ce604c84bbd706ba34aabca1d5a7376e18ba6", "_shrinkwrap": null, "_spec": "angular-ui-bootstrap", - "_where": "/home/spinlock/.gopath/src/github.com/wandoulabs/codis/cmd/fe/assets", + "_where": "/home/spinlock/.gopath/src/github.com/CodisLabs/codis/cmd/fe/assets", "author": { "name": "https://github.com/angular-ui/bootstrap/graphs/contributors" }, diff --git a/cmd/fe/assets/node_modules/angular/package.json b/cmd/fe/assets/node_modules/angular/package.json index b8f321bb0..ba4f77f93 100644 --- a/cmd/fe/assets/node_modules/angular/package.json +++ b/cmd/fe/assets/node_modules/angular/package.json @@ -2,7 +2,7 @@ "_args": [ [ "angular", - "/home/spinlock/.gopath/src/github.com/wandoulabs/codis/cmd/fe/assets" + "/home/spinlock/.gopath/src/github.com/CodisLabs/codis/cmd/fe/assets" ] ], "_from": "angular@latest", @@ -32,7 +32,7 @@ "_shasum": "f4573d5019d21ebf44a6b5c28a14fbd9d5967449", "_shrinkwrap": null, "_spec": "angular", - "_where": "/home/spinlock/.gopath/src/github.com/wandoulabs/codis/cmd/fe/assets", + "_where": "/home/spinlock/.gopath/src/github.com/CodisLabs/codis/cmd/fe/assets", "author": { "email": "angular-core+npm@google.com", "name": "Angular Core Team" diff --git a/cmd/fe/assets/node_modules/bootstrap-dialog/package.json b/cmd/fe/assets/node_modules/bootstrap-dialog/package.json index 3c3b74c97..26e89e1fd 100644 --- a/cmd/fe/assets/node_modules/bootstrap-dialog/package.json +++ b/cmd/fe/assets/node_modules/bootstrap-dialog/package.json @@ -2,7 +2,7 @@ "_args": [ [ "bootstrap-dialog", - "/home/spinlock/.gopath/src/github.com/wandoulabs/codis/cmd/fe/assets" + "/home/spinlock/.gopath/src/github.com/CodisLabs/codis/cmd/fe/assets" ] ], "_from": "bootstrap-dialog@latest", @@ -32,7 +32,7 @@ "_shasum": "6e5e15a4dc8e0a8ae0c539a50d00628a8da65f0b", "_shrinkwrap": null, "_spec": "bootstrap-dialog", - "_where": "/home/spinlock/.gopath/src/github.com/wandoulabs/codis/cmd/fe/assets", + "_where": "/home/spinlock/.gopath/src/github.com/CodisLabs/codis/cmd/fe/assets", "author": { "name": "nakupanda" }, diff --git a/cmd/fe/assets/node_modules/bootstrap/package.json b/cmd/fe/assets/node_modules/bootstrap/package.json index dd8b0429c..361563203 100644 --- a/cmd/fe/assets/node_modules/bootstrap/package.json +++ b/cmd/fe/assets/node_modules/bootstrap/package.json @@ -2,7 +2,7 @@ "_args": [ [ "bootstrap", - "/home/spinlock/.gopath/src/github.com/wandoulabs/codis/cmd/fe/assets" + "/home/spinlock/.gopath/src/github.com/CodisLabs/codis/cmd/fe/assets" ] ], "_from": "bootstrap@latest", @@ -32,7 +32,7 @@ "_shasum": "8de8f749dc8a743f2ac5b510d988371e3daa6589", "_shrinkwrap": null, "_spec": "bootstrap", - "_where": "/home/spinlock/.gopath/src/github.com/wandoulabs/codis/cmd/fe/assets", + "_where": "/home/spinlock/.gopath/src/github.com/CodisLabs/codis/cmd/fe/assets", "author": { "name": "Twitter, Inc." }, diff --git a/cmd/fe/assets/node_modules/convert-hex/package.json b/cmd/fe/assets/node_modules/convert-hex/package.json index 28a7a306b..e86f03d2a 100644 --- a/cmd/fe/assets/node_modules/convert-hex/package.json +++ b/cmd/fe/assets/node_modules/convert-hex/package.json @@ -2,7 +2,7 @@ "_args": [ [ "convert-hex@~0.1.0", - "/home/spinlock/.gopath/src/github.com/wandoulabs/codis/cmd/fe/assets/node_modules/sha256" + "/home/spinlock/.gopath/src/github.com/CodisLabs/codis/cmd/fe/assets/node_modules/sha256" ] ], "_from": "convert-hex@>=0.1.0 <0.2.0", @@ -31,7 +31,7 @@ "_shasum": "08c04568922c27776b8a2e81a95d393362ea0b65", "_shrinkwrap": null, "_spec": "convert-hex@~0.1.0", - "_where": "/home/spinlock/.gopath/src/github.com/wandoulabs/codis/cmd/fe/assets/node_modules/sha256", + "_where": "/home/spinlock/.gopath/src/github.com/CodisLabs/codis/cmd/fe/assets/node_modules/sha256", "bugs": { "url": "https://github.com/cryptocoinjs/convert-hex/issues" }, diff --git a/cmd/fe/assets/node_modules/convert-string/package.json b/cmd/fe/assets/node_modules/convert-string/package.json index 3a9fd756f..408e04d8a 100644 --- a/cmd/fe/assets/node_modules/convert-string/package.json +++ b/cmd/fe/assets/node_modules/convert-string/package.json @@ -2,7 +2,7 @@ "_args": [ [ "convert-string@~0.1.0", - "/home/spinlock/.gopath/src/github.com/wandoulabs/codis/cmd/fe/assets/node_modules/sha256" + "/home/spinlock/.gopath/src/github.com/CodisLabs/codis/cmd/fe/assets/node_modules/sha256" ] ], "_from": "convert-string@>=0.1.0 <0.2.0", @@ -31,7 +31,7 @@ "_shasum": "79ce41a9bb0d03bcf72cdc6a8f3c56fbbc64410a", "_shrinkwrap": null, "_spec": "convert-string@~0.1.0", - "_where": "/home/spinlock/.gopath/src/github.com/wandoulabs/codis/cmd/fe/assets/node_modules/sha256", + "_where": "/home/spinlock/.gopath/src/github.com/CodisLabs/codis/cmd/fe/assets/node_modules/sha256", "bugs": { "url": "https://github.com/cryptocoinjs/convert-string/issues" }, diff --git a/cmd/fe/assets/node_modules/highcharts-ng/package.json b/cmd/fe/assets/node_modules/highcharts-ng/package.json index 7b80c0205..ae4c2c403 100644 --- a/cmd/fe/assets/node_modules/highcharts-ng/package.json +++ b/cmd/fe/assets/node_modules/highcharts-ng/package.json @@ -2,7 +2,7 @@ "_args": [ [ "highcharts-ng", - "/home/spinlock/.gopath/src/github.com/wandoulabs/codis/cmd/fe/assets" + "/home/spinlock/.gopath/src/github.com/CodisLabs/codis/cmd/fe/assets" ] ], "_from": "highcharts-ng@latest", @@ -32,7 +32,7 @@ "_shasum": "3bf957e4bf99fbe3eed208ca9e393d69c356d7c1", "_shrinkwrap": null, "_spec": "highcharts-ng", - "_where": "/home/spinlock/.gopath/src/github.com/wandoulabs/codis/cmd/fe/assets", + "_where": "/home/spinlock/.gopath/src/github.com/CodisLabs/codis/cmd/fe/assets", "author": { "name": "Barry Fitzgerald", "url": "https://github.com/pablojim" diff --git a/cmd/fe/assets/node_modules/highcharts/package.json b/cmd/fe/assets/node_modules/highcharts/package.json index d95eca3fb..687ee1deb 100644 --- a/cmd/fe/assets/node_modules/highcharts/package.json +++ b/cmd/fe/assets/node_modules/highcharts/package.json @@ -2,7 +2,7 @@ "_args": [ [ "highcharts", - "/home/spinlock/.gopath/src/github.com/wandoulabs/codis/cmd/fe/assets" + "/home/spinlock/.gopath/src/github.com/CodisLabs/codis/cmd/fe/assets" ] ], "_from": "highcharts@latest", @@ -32,7 +32,7 @@ "_shasum": "e93802888a7be911d123ed953be0aaa9397fd1ec", "_shrinkwrap": null, "_spec": "highcharts", - "_where": "/home/spinlock/.gopath/src/github.com/wandoulabs/codis/cmd/fe/assets", + "_where": "/home/spinlock/.gopath/src/github.com/CodisLabs/codis/cmd/fe/assets", "author": { "email": "support@highcharts.com", "name": "Highsoft AS", diff --git a/cmd/fe/assets/node_modules/jquery/package.json b/cmd/fe/assets/node_modules/jquery/package.json index ac6e77d77..a32039941 100644 --- a/cmd/fe/assets/node_modules/jquery/package.json +++ b/cmd/fe/assets/node_modules/jquery/package.json @@ -2,7 +2,7 @@ "_args": [ [ "jquery", - "/home/spinlock/.gopath/src/github.com/wandoulabs/codis/cmd/fe/assets" + "/home/spinlock/.gopath/src/github.com/CodisLabs/codis/cmd/fe/assets" ] ], "_from": "jquery@latest", @@ -32,7 +32,7 @@ "_shasum": "228bde698a0c61431dc2630a6a154f15890d2317", "_shrinkwrap": null, "_spec": "jquery", - "_where": "/home/spinlock/.gopath/src/github.com/wandoulabs/codis/cmd/fe/assets", + "_where": "/home/spinlock/.gopath/src/github.com/CodisLabs/codis/cmd/fe/assets", "author": { "name": "jQuery Foundation and other contributors", "url": "https://github.com/jquery/jquery/blob/2.1.4/AUTHORS.txt" diff --git a/cmd/fe/assets/node_modules/sha256/package.json b/cmd/fe/assets/node_modules/sha256/package.json index 7b302aa9d..70d1c6955 100644 --- a/cmd/fe/assets/node_modules/sha256/package.json +++ b/cmd/fe/assets/node_modules/sha256/package.json @@ -2,7 +2,7 @@ "_args": [ [ "sha256", - "/home/spinlock/.gopath/src/github.com/wandoulabs/codis/cmd/fe/assets" + "/home/spinlock/.gopath/src/github.com/CodisLabs/codis/cmd/fe/assets" ] ], "_from": "sha256@latest", @@ -32,7 +32,7 @@ "_shasum": "73a0b418daab7035bff86e8491e363412fc2ab05", "_shrinkwrap": null, "_spec": "sha256", - "_where": "/home/spinlock/.gopath/src/github.com/wandoulabs/codis/cmd/fe/assets", + "_where": "/home/spinlock/.gopath/src/github.com/CodisLabs/codis/cmd/fe/assets", "browser": "./lib/sha256.js", "bugs": { "url": "https://github.com/cryptocoinjs/sha256/issues" diff --git a/cmd/fe/main.go b/cmd/fe/main.go index e05011964..e3db9bf44 100644 --- a/cmd/fe/main.go +++ b/cmd/fe/main.go @@ -18,11 +18,12 @@ import ( "github.com/docopt/docopt-go" "github.com/go-martini/martini" "github.com/martini-contrib/render" - "github.com/wandoulabs/codis/pkg/utils" - "github.com/wandoulabs/codis/pkg/utils/errors" - "github.com/wandoulabs/codis/pkg/utils/log" - "github.com/wandoulabs/codis/pkg/utils/rpc" - "github.com/wandoulabs/codis/pkg/utils/sync2/atomic2" + + "github.com/CodisLabs/codis/pkg/utils" + "github.com/CodisLabs/codis/pkg/utils/errors" + "github.com/CodisLabs/codis/pkg/utils/log" + "github.com/CodisLabs/codis/pkg/utils/rpc" + "github.com/CodisLabs/codis/pkg/utils/sync2/atomic2" ) var roundTripper http.RoundTripper diff --git a/cmd/ha/main.go b/cmd/ha/main.go index a6499562f..869ce1342 100644 --- a/cmd/ha/main.go +++ b/cmd/ha/main.go @@ -6,9 +6,10 @@ import ( "time" "github.com/docopt/docopt-go" - "github.com/wandoulabs/codis/pkg/topom" - "github.com/wandoulabs/codis/pkg/utils" - "github.com/wandoulabs/codis/pkg/utils/log" + + "github.com/CodisLabs/codis/pkg/topom" + "github.com/CodisLabs/codis/pkg/utils" + "github.com/CodisLabs/codis/pkg/utils/log" ) func main() { diff --git a/cmd/proxy/main.go b/cmd/proxy/main.go index 6bb38e6d7..ed670c98a 100644 --- a/cmd/proxy/main.go +++ b/cmd/proxy/main.go @@ -16,9 +16,9 @@ import ( "github.com/docopt/docopt-go" - "github.com/wandoulabs/codis/pkg/proxy" - "github.com/wandoulabs/codis/pkg/utils" - "github.com/wandoulabs/codis/pkg/utils/log" + "github.com/CodisLabs/codis/pkg/proxy" + "github.com/CodisLabs/codis/pkg/utils" + "github.com/CodisLabs/codis/pkg/utils/log" ) func main() { diff --git a/doc/FAQ_zh.md b/doc/FAQ_zh.md index 7e52194e3..59acdaace 100644 --- a/doc/FAQ_zh.md +++ b/doc/FAQ_zh.md @@ -16,7 +16,7 @@ Codis支持水平扩容/缩容,扩容可以直接界面的 "Auto Rebalance" 可以, 使用codis项目内的redis-port工具, 可以实时的同步 twemproxy 底下的 redis 数据到你的 codis 集群上. 搞定了以后, 只需要你修改一下你的配置, 将 twemproxy 的地址改成 codis 的地址就好了. 除此之外, 你什么事情都不用做. 2) 原来使用 Redis 的用户: -如果你使用了[doc/unsupported_cmds](https://github.com/wandoulabs/codis/blob/master/doc/unsupported_cmds.md)中提到的命令,是无法直接迁移到 Codis 上的. 你需要修改你的代码, 用其他的方式实现. +如果你使用了[doc/unsupported_cmds](https://github.com/CodisLabs/codis/blob/master/doc/unsupported_cmds.md)中提到的命令,是无法直接迁移到 Codis 上的. 你需要修改你的代码, 用其他的方式实现. ###相对于twemproxy的优劣? codis和twemproxy最大的区别有两个:一个是codis支持动态水平扩展,对client完全透明不影响服务的情况下可以完成增减redis实例的操作;一个是codis是用go语言写的并支持多线程而twemproxy用C并只用单线程。 @@ -58,7 +58,7 @@ CAS 暂时不支持, 目前只支持eval的方式来跑lua脚本,需要配合T ###Codis的性能如何? -见Readme中的[Benchmark一节](https://github.com/wandoulabs/codis#performance-benchmark)。 +见Readme中的[Benchmark一节](https://github.com/CodisLabs/codis#performance-benchmark)。 ###我的数据在 Codis 上是安全的吗? @@ -75,11 +75,11 @@ CAS 暂时不支持, 目前只支持eval的方式来跑lua脚本,需要配合T 支持,请参考使用教程,需要将配置文件中的coordinator=zookeeper改为etcd。 -但是需要注意:请使用codis2.0.10或更新的版本,旧版对etcd的支持有一些问题;由于etcd在2.2引入了一个与旧版不兼容的坑爹改动,导致如果使用etcd的版本>=2.2.0,暂时需要手动改一处代码,详情见[相关issue](https://github.com/wandoulabs/codis/issues/488)。 +但是需要注意:请使用codis2.0.10或更新的版本,旧版对etcd的支持有一些问题;由于etcd在2.2引入了一个与旧版不兼容的坑爹改动,导致如果使用etcd的版本>=2.2.0,暂时需要手动改一处代码,详情见[相关issue](https://github.com/CodisLabs/codis/issues/488)。 ###现有redis集群上有上T的数据,如何迁移到Codis上来? -为了提高 Codis 推广和部署上的效率,我们为数据迁移提供了一个叫做 [redis-port](https://github.com/wandoulabs/redis-port) 的命令行工具,它能够: +为了提高 Codis 推广和部署上的效率,我们为数据迁移提供了一个叫做 [redis-port](https://github.com/CodisLabs/redis-port) 的命令行工具,它能够: + 静态分析 RDB 文件,包括解析以及恢复 RDB 数据到 redis + 从 redis 上 dump RDB 文件以及从 redis 和 codis 之间动态同步数据 @@ -110,7 +110,7 @@ CAS 暂时不支持, 目前只支持eval的方式来跑lua脚本,需要配合T + redis-port 本质是以 slave 的形式挂载到现有 redis 服务上去的 1. redis 会生成 RDB DUMP 文件给作为 slave 的 redis-port - 2. redis-port 分析 RDB 文件,并拆分成 key-value 对,通过 [slotsrestore](https://github.com/wandoulabs/codis/blob/master/doc/redis_change_zh.md#slotsrestore-key1-ttl1-val1-key2-ttl2-val2-) 指令发给 codis + 2. redis-port 分析 RDB 文件,并拆分成 key-value 对,通过 [slotsrestore](https://github.com/CodisLabs/codis/blob/master/doc/redis_change_zh.md#slotsrestore-key1-ttl1-val1-key2-ttl2-val2-) 指令发给 codis 3. 迁移过程中发生的修改,redis 会将这些指令在 RDB DUMP 发送完成后,再发给 redis-port,而 redis-port 收到这些指令后不作处理,而直接转发给 Codis + redis-port 处理还是很快的,参考: @@ -127,7 +127,7 @@ CAS 暂时不支持, 目前只支持eval的方式来跑lua脚本,需要配合T 因此关闭服务的时候直接用`kill {pid}`不要-9,同时如果无法启动并且确认没有其他运行中的进程占用zk上的节点,可以在zk上手动删除/zk/codis/db_test/dashboard 或/zk/codis/db_test/fence/{host:port}. ### 编译报错 undefined: utils.Version -说明没有正确的设置go项目路径导致生成的文件找不到。见[安装教程](https://github.com/wandoulabs/codis/blob/master/doc/tutorial_zh.md#build-codis-proxy--codis-config)来正确配置环境变量并用正确的方式下载代码。 +说明没有正确的设置go项目路径导致生成的文件找不到。见[安装教程](https://github.com/CodisLabs/codis/blob/master/doc/tutorial_zh.md#build-codis-proxy--codis-config)来正确配置环境变量并用正确的方式下载代码。 ### zk: session has been expired by the server 因为使用的go-zookeeper库代码注释里写的session超时时间参数单位是秒,但实际上该参数的单位是毫秒,所以<=2.0.7的版本错误的将默认配置设成30。因此请将配置文件修改为30000。此外2.0.8起如果配置文件中的参数过小则自动将秒转化为毫秒。 @@ -135,8 +135,8 @@ CAS 暂时不支持, 目前只支持eval的方式来跑lua脚本,需要配合T Codis的proxy会注册在zk上并监听新的zk事件。因为涉及到数据一致性的问题,所有proxy必须能尽快知道slot状态的改变,因此一旦和zk的连接出了问题就无法知道最新的slot信息从而可能不得不阻塞一些请求以防止数据错误或丢失。 Proxy会每几秒给zk发心跳,proxy的load太高可能导致timeout时间内(默认30秒,配置文件中可以修改)没有成功发心跳导致zk认为proxy已经挂了(当然也可能proxy确实挂了), -这时如果client用了我们修改的Jedis, [Jodis](https://github.com/wandoulabs/jodis),是会监控到zk节点上proxy少了一个从而自动避开请求这个proxy以保证客户端业务的可用性。如果用非Java语言可以根据Jodis代码DIY一个监听zk的客户端。 -另外,如果需要异步请求,可以使用我们基于Netty开发的[Nedis](https://github.com/wandoulabs/nedis)。 +这时如果client用了我们修改的Jedis, [Jodis](https://github.com/CodisLabs/jodis),是会监控到zk节点上proxy少了一个从而自动避开请求这个proxy以保证客户端业务的可用性。如果用非Java语言可以根据Jodis代码DIY一个监听zk的客户端。 +另外,如果需要异步请求,可以使用我们基于Netty开发的[Nedis](https://github.com/CodisLabs/nedis)。 当然,proxy收到session expired的错误也不意味着proxy一定要强制退出,但是这是最方便、安全的实现方式。而且实际使用中出现错误的情况通常是zk或proxy的load过高导致的,即使这时不退出可能业务的请求也会受影响,因此出现这个问题通常意味着需要加机器了。 diff --git a/doc/tutorial_en.md b/doc/tutorial_en.md index 14b27f757..29f480059 100644 --- a/doc/tutorial_en.md +++ b/doc/tutorial_en.md @@ -23,8 +23,8 @@ Codis support namespace, configs of products with different name won’t be con * install go [see official doc](https://golang.org/doc/install) * set $GOPATH correctly and set PATH=$GOPATH/bin:$PATH to execute commands installed by `go get` -* execute `go get -u -d github.com/wandoulabs/codis` to download codis -* change directory to `$GOPATH/src/github.com/wandoulabs/codis` and execute `make` to compile, execute `make gotest` to run unit test +* execute `go get -u -d github.com/CodisLabs/codis` to download codis +* change directory to `$GOPATH/src/github.com/CodisLabs/codis` and execute `make` to compile, execute `make gotest` to run unit test Two executable file `codas-config` and `codis-proxy` should be generated in `codis/bin`(`bin/assets` is the resources for `codis-config` dashboard, should be placed at same directory with `codis-config`). @@ -66,7 +66,7 @@ options: ### Configuration file `codis-config` and `codis-proxy` will take `config.ini` in current directory by default without a specific `-c`. -See [config.ini](https://github.com/wandoulabs/codis/blob/master/config.ini)'s comments. +See [config.ini](https://github.com/CodisLabs/codis/blob/master/config.ini)'s comments. ### Workflow 0. Execute `codis-config dashboard` , start dashboard. @@ -177,8 +177,8 @@ Requirements: Codis's proxy is stateless so you can run more than one proxies to get high availability and horizontal scalability. -For Java users, you can use a modified Jedis, [Jodis](https://github.com/wandoulabs/jodis). It will watch the ZooKeeper to get the real-time available proxies, then query via them using a round robin policy to balance load and detect proxy online and offline automatically. -If asynchronous request is required, you can use [Nedis](https://github.com/wandoulabs/nedis) which is implemented based on Netty. +For Java users, you can use a modified Jedis, [Jodis](https://github.com/CodisLabs/jodis). It will watch the ZooKeeper to get the real-time available proxies, then query via them using a round robin policy to balance load and detect proxy online and offline automatically. +If asynchronous request is required, you can use [Nedis](https://github.com/CodisLabs/nedis) which is implemented based on Netty. For redis instances, the designers of codis think when a master down, system administrator should know about it and promote a slave to master by hand, not automatically. Because a crashed master may result in the data in this group not consistent. But we also offer a solution: [codis-ha](https://github.com/ngaut/codis-ha)。It is a tool using codis rest api to promote a slave to master when it find the master down. diff --git a/doc/tutorial_zh.md b/doc/tutorial_zh.md index c3737522b..8b5517a36 100644 --- a/doc/tutorial_zh.md +++ b/doc/tutorial_zh.md @@ -62,10 +62,10 @@ $ go get -u github.com/tools/godep && which godep #### 3. 下载 Codis 源代码 -下载完成后,Codis 源码会出现在 `$GOPATH/src/github.com/wandoulabs/codis` 路径下: +下载完成后,Codis 源码会出现在 `$GOPATH/src/github.com/CodisLabs/codis` 路径下: ```bash -$ go get -u -d github.com/wandoulabs/codis +$ go get -u -d github.com/CodisLabs/codis ``` #### 4. 编译 Codis 源代码 @@ -74,7 +74,7 @@ $ go get -u -d github.com/wandoulabs/codis * 直接通过 make 进行编译,会看到如下输出: ```bash -$ cd $GOPATH/src/github.com/wandoulabs/codis +$ cd $GOPATH/src/github.com/CodisLabs/codis $ make make -j -C extern/redis-2.8.21/ ... ... @@ -439,12 +439,12 @@ $ ./bin/codis-admin --dashboard=127.0.0.1:18080 --remove-proxy --addr=127.0.0.1: 因为 codis-proxy 是无状态的,可以比较容易的搭多个实例,达到高可用性和横向扩展。 -对 Java 用户来说,可以使用基于 Jedis 的实现 [Jodis](https://github.com/wandoulabs/jodis) ,来实现 proxy 层的 HA: +对 Java 用户来说,可以使用基于 Jedis 的实现 [Jodis](https://github.com/CodisLabs/jodis) ,来实现 proxy 层的 HA: + 它会通过监控 zookeeper 上的注册信息来实时获得当前可用的 proxy 列表,既可以保证高可用性; + 也可以通过轮流请求所有的proxy实现负载均衡。 -如果需要异步请求,可以使用我们基于Netty开发的 [Nedis](https://github.com/wandoulabs/nedis)。 +如果需要异步请求,可以使用我们基于Netty开发的 [Nedis](https://github.com/CodisLabs/nedis)。 对下层的 redis 实例来说,当一个 group 的 master 挂掉的时候,应该让管理员清楚,并手动的操作,因为这涉及到了数据一致性等问题(redis的主从同步是最终一致性的)。因此 codis 不会自动的将某个 slave 升级成 master。关于外部 codis-ha 工具(具体可以参考之前的章节),这是一个通过 codis-dashboard 开放的 RESTful API 实现自动切换主从的工具。该工具会在检测到 master 挂掉的时候主动应用主从切换策略,提升单个 slave 成为新的 master。 diff --git a/pkg/models/encode.go b/pkg/models/encode.go index 1b139fa3b..e821a372a 100644 --- a/pkg/models/encode.go +++ b/pkg/models/encode.go @@ -6,8 +6,8 @@ package models import ( "encoding/json" - "github.com/wandoulabs/codis/pkg/utils/errors" - "github.com/wandoulabs/codis/pkg/utils/log" + "github.com/CodisLabs/codis/pkg/utils/errors" + "github.com/CodisLabs/codis/pkg/utils/log" ) func jsonEncode(v interface{}) []byte { diff --git a/pkg/models/etcd/etcdclient.go b/pkg/models/etcd/etcdclient.go index efb173db3..2ef310e73 100644 --- a/pkg/models/etcd/etcdclient.go +++ b/pkg/models/etcd/etcdclient.go @@ -12,8 +12,8 @@ import ( "github.com/coreos/etcd/client" - "github.com/wandoulabs/codis/pkg/utils/errors" - "github.com/wandoulabs/codis/pkg/utils/log" + "github.com/CodisLabs/codis/pkg/utils/errors" + "github.com/CodisLabs/codis/pkg/utils/log" ) var ErrClosedEtcdClient = errors.New("use of closed etcd client") diff --git a/pkg/models/zk/zkclient.go b/pkg/models/zk/zkclient.go index df1be4316..b90e47b85 100644 --- a/pkg/models/zk/zkclient.go +++ b/pkg/models/zk/zkclient.go @@ -12,8 +12,8 @@ import ( "github.com/samuel/go-zookeeper/zk" - "github.com/wandoulabs/codis/pkg/utils/errors" - "github.com/wandoulabs/codis/pkg/utils/log" + "github.com/CodisLabs/codis/pkg/utils/errors" + "github.com/CodisLabs/codis/pkg/utils/log" ) var ErrClosedZkClient = errors.New("use of closed zk client") diff --git a/pkg/proxy/config.go b/pkg/proxy/config.go index c6b6a55ee..5918322f0 100644 --- a/pkg/proxy/config.go +++ b/pkg/proxy/config.go @@ -8,8 +8,8 @@ import ( "github.com/BurntSushi/toml" - "github.com/wandoulabs/codis/pkg/utils/errors" - "github.com/wandoulabs/codis/pkg/utils/log" + "github.com/CodisLabs/codis/pkg/utils/errors" + "github.com/CodisLabs/codis/pkg/utils/log" ) const DefaultConfig = ` diff --git a/pkg/proxy/jodis.go b/pkg/proxy/jodis.go index 38c2465e2..934bfa11b 100644 --- a/pkg/proxy/jodis.go +++ b/pkg/proxy/jodis.go @@ -10,11 +10,11 @@ import ( "sync" "time" - "github.com/wandoulabs/codis/pkg/models" - "github.com/wandoulabs/codis/pkg/models/zk" - "github.com/wandoulabs/codis/pkg/utils" - "github.com/wandoulabs/codis/pkg/utils/errors" - "github.com/wandoulabs/codis/pkg/utils/log" + "github.com/CodisLabs/codis/pkg/models" + "github.com/CodisLabs/codis/pkg/models/zk" + "github.com/CodisLabs/codis/pkg/utils" + "github.com/CodisLabs/codis/pkg/utils/errors" + "github.com/CodisLabs/codis/pkg/utils/log" ) var ErrClosedJodis = errors.New("use of closed jodis") diff --git a/pkg/proxy/proxy.go b/pkg/proxy/proxy.go index ab9450eff..404989612 100644 --- a/pkg/proxy/proxy.go +++ b/pkg/proxy/proxy.go @@ -12,12 +12,12 @@ import ( "sync" "time" - "github.com/wandoulabs/codis/pkg/models" - "github.com/wandoulabs/codis/pkg/proxy/router" - "github.com/wandoulabs/codis/pkg/utils" - "github.com/wandoulabs/codis/pkg/utils/errors" - "github.com/wandoulabs/codis/pkg/utils/log" - "github.com/wandoulabs/codis/pkg/utils/rpc" + "github.com/CodisLabs/codis/pkg/models" + "github.com/CodisLabs/codis/pkg/proxy/router" + "github.com/CodisLabs/codis/pkg/utils" + "github.com/CodisLabs/codis/pkg/utils/errors" + "github.com/CodisLabs/codis/pkg/utils/log" + "github.com/CodisLabs/codis/pkg/utils/rpc" ) type Proxy struct { diff --git a/pkg/proxy/proxy_api.go b/pkg/proxy/proxy_api.go index a068d281d..37cafd70c 100644 --- a/pkg/proxy/proxy_api.go +++ b/pkg/proxy/proxy_api.go @@ -14,12 +14,12 @@ import ( "github.com/martini-contrib/gzip" "github.com/martini-contrib/render" - "github.com/wandoulabs/codis/pkg/models" - "github.com/wandoulabs/codis/pkg/proxy/router" - "github.com/wandoulabs/codis/pkg/utils" - "github.com/wandoulabs/codis/pkg/utils/errors" - "github.com/wandoulabs/codis/pkg/utils/log" - "github.com/wandoulabs/codis/pkg/utils/rpc" + "github.com/CodisLabs/codis/pkg/models" + "github.com/CodisLabs/codis/pkg/proxy/router" + "github.com/CodisLabs/codis/pkg/utils" + "github.com/CodisLabs/codis/pkg/utils/errors" + "github.com/CodisLabs/codis/pkg/utils/log" + "github.com/CodisLabs/codis/pkg/utils/rpc" ) type apiServer struct { diff --git a/pkg/proxy/proxy_test.go b/pkg/proxy/proxy_test.go index 70eece1ec..dddf923bd 100644 --- a/pkg/proxy/proxy_test.go +++ b/pkg/proxy/proxy_test.go @@ -6,10 +6,10 @@ package proxy_test import ( "testing" - "github.com/wandoulabs/codis/pkg/models" - "github.com/wandoulabs/codis/pkg/proxy" - "github.com/wandoulabs/codis/pkg/utils/assert" - "github.com/wandoulabs/codis/pkg/utils/log" + "github.com/CodisLabs/codis/pkg/models" + "github.com/CodisLabs/codis/pkg/proxy" + "github.com/CodisLabs/codis/pkg/utils/assert" + "github.com/CodisLabs/codis/pkg/utils/log" ) var config = newProxyConfig() diff --git a/pkg/proxy/redis/conn.go b/pkg/proxy/redis/conn.go index c6d773104..8253c2178 100644 --- a/pkg/proxy/redis/conn.go +++ b/pkg/proxy/redis/conn.go @@ -7,7 +7,7 @@ import ( "net" "time" - "github.com/wandoulabs/codis/pkg/utils/errors" + "github.com/CodisLabs/codis/pkg/utils/errors" ) type Conn struct { diff --git a/pkg/proxy/redis/conn_test.go b/pkg/proxy/redis/conn_test.go index 259a287f1..3d1956671 100644 --- a/pkg/proxy/redis/conn_test.go +++ b/pkg/proxy/redis/conn_test.go @@ -10,9 +10,9 @@ import ( "testing" "time" - "github.com/wandoulabs/codis/pkg/utils/assert" - "github.com/wandoulabs/codis/pkg/utils/errors" - "github.com/wandoulabs/codis/pkg/utils/sync2/atomic2" + "github.com/CodisLabs/codis/pkg/utils/assert" + "github.com/CodisLabs/codis/pkg/utils/errors" + "github.com/CodisLabs/codis/pkg/utils/sync2/atomic2" ) func newConnPair() (*Conn, *Conn) { diff --git a/pkg/proxy/redis/decoder.go b/pkg/proxy/redis/decoder.go index a80e1f552..a2dadca95 100644 --- a/pkg/proxy/redis/decoder.go +++ b/pkg/proxy/redis/decoder.go @@ -9,7 +9,7 @@ import ( "io" "strconv" - "github.com/wandoulabs/codis/pkg/utils/errors" + "github.com/CodisLabs/codis/pkg/utils/errors" ) var ( diff --git a/pkg/proxy/redis/decoder_test.go b/pkg/proxy/redis/decoder_test.go index 91e509942..0e4e8f013 100644 --- a/pkg/proxy/redis/decoder_test.go +++ b/pkg/proxy/redis/decoder_test.go @@ -7,7 +7,7 @@ import ( "bytes" "testing" - "github.com/wandoulabs/codis/pkg/utils/assert" + "github.com/CodisLabs/codis/pkg/utils/assert" ) func TestBtoi(t *testing.T) { diff --git a/pkg/proxy/redis/encoder.go b/pkg/proxy/redis/encoder.go index e05cc7028..9460455f9 100644 --- a/pkg/proxy/redis/encoder.go +++ b/pkg/proxy/redis/encoder.go @@ -9,7 +9,7 @@ import ( "io" "strconv" - "github.com/wandoulabs/codis/pkg/utils/errors" + "github.com/CodisLabs/codis/pkg/utils/errors" ) var ( diff --git a/pkg/proxy/redis/encoder_test.go b/pkg/proxy/redis/encoder_test.go index e1c055175..ba1b92e7f 100644 --- a/pkg/proxy/redis/encoder_test.go +++ b/pkg/proxy/redis/encoder_test.go @@ -9,7 +9,7 @@ import ( "strconv" "testing" - "github.com/wandoulabs/codis/pkg/utils/assert" + "github.com/CodisLabs/codis/pkg/utils/assert" ) var tmap = make(map[int64][]byte) diff --git a/pkg/proxy/router/backend.go b/pkg/proxy/router/backend.go index c13e72e19..fe171a82a 100644 --- a/pkg/proxy/router/backend.go +++ b/pkg/proxy/router/backend.go @@ -8,9 +8,9 @@ import ( "sync" "time" - "github.com/wandoulabs/codis/pkg/proxy/redis" - "github.com/wandoulabs/codis/pkg/utils/errors" - "github.com/wandoulabs/codis/pkg/utils/log" + "github.com/CodisLabs/codis/pkg/proxy/redis" + "github.com/CodisLabs/codis/pkg/utils/errors" + "github.com/CodisLabs/codis/pkg/utils/log" ) type BackendConn struct { diff --git a/pkg/proxy/router/backend_test.go b/pkg/proxy/router/backend_test.go index d7912cdb3..679585fd0 100644 --- a/pkg/proxy/router/backend_test.go +++ b/pkg/proxy/router/backend_test.go @@ -10,8 +10,8 @@ import ( "testing" "time" - "github.com/wandoulabs/codis/pkg/proxy/redis" - "github.com/wandoulabs/codis/pkg/utils/assert" + "github.com/CodisLabs/codis/pkg/proxy/redis" + "github.com/CodisLabs/codis/pkg/utils/assert" ) func TestBackend(t *testing.T) { diff --git a/pkg/proxy/router/mapper.go b/pkg/proxy/router/mapper.go index a9578bb7f..ca8bab623 100644 --- a/pkg/proxy/router/mapper.go +++ b/pkg/proxy/router/mapper.go @@ -8,9 +8,9 @@ import ( "hash/crc32" "strings" - "github.com/wandoulabs/codis/pkg/models" - "github.com/wandoulabs/codis/pkg/proxy/redis" - "github.com/wandoulabs/codis/pkg/utils/errors" + "github.com/CodisLabs/codis/pkg/models" + "github.com/CodisLabs/codis/pkg/proxy/redis" + "github.com/CodisLabs/codis/pkg/utils/errors" ) var charmap [128]byte diff --git a/pkg/proxy/router/mapper_test.go b/pkg/proxy/router/mapper_test.go index 60031e150..bdecbc902 100644 --- a/pkg/proxy/router/mapper_test.go +++ b/pkg/proxy/router/mapper_test.go @@ -6,8 +6,8 @@ package router import ( "testing" - "github.com/wandoulabs/codis/pkg/proxy/redis" - "github.com/wandoulabs/codis/pkg/utils/assert" + "github.com/CodisLabs/codis/pkg/proxy/redis" + "github.com/CodisLabs/codis/pkg/utils/assert" ) func TestGetOpStr(t *testing.T) { diff --git a/pkg/proxy/router/request.go b/pkg/proxy/router/request.go index dd542d523..f5b480c64 100644 --- a/pkg/proxy/router/request.go +++ b/pkg/proxy/router/request.go @@ -6,9 +6,9 @@ package router import ( "sync" - "github.com/wandoulabs/codis/pkg/proxy/redis" - "github.com/wandoulabs/codis/pkg/utils/errors" - "github.com/wandoulabs/codis/pkg/utils/sync2/atomic2" + "github.com/CodisLabs/codis/pkg/proxy/redis" + "github.com/CodisLabs/codis/pkg/utils/errors" + "github.com/CodisLabs/codis/pkg/utils/sync2/atomic2" ) type Dispatcher interface { diff --git a/pkg/proxy/router/router.go b/pkg/proxy/router/router.go index f92aa5072..013051ea4 100644 --- a/pkg/proxy/router/router.go +++ b/pkg/proxy/router/router.go @@ -7,9 +7,9 @@ import ( "net" "sync" - "github.com/wandoulabs/codis/pkg/models" - "github.com/wandoulabs/codis/pkg/utils/errors" - "github.com/wandoulabs/codis/pkg/utils/log" + "github.com/CodisLabs/codis/pkg/models" + "github.com/CodisLabs/codis/pkg/utils/errors" + "github.com/CodisLabs/codis/pkg/utils/log" ) type Router struct { diff --git a/pkg/proxy/router/session.go b/pkg/proxy/router/session.go index 050a7c205..e77fb515c 100644 --- a/pkg/proxy/router/session.go +++ b/pkg/proxy/router/session.go @@ -11,10 +11,10 @@ import ( "sync" "time" - "github.com/wandoulabs/codis/pkg/proxy/redis" - "github.com/wandoulabs/codis/pkg/utils/errors" - "github.com/wandoulabs/codis/pkg/utils/log" - "github.com/wandoulabs/codis/pkg/utils/sync2/atomic2" + "github.com/CodisLabs/codis/pkg/proxy/redis" + "github.com/CodisLabs/codis/pkg/utils/errors" + "github.com/CodisLabs/codis/pkg/utils/log" + "github.com/CodisLabs/codis/pkg/utils/sync2/atomic2" ) type Session struct { diff --git a/pkg/proxy/router/slots.go b/pkg/proxy/router/slots.go index 6cfe4c091..eb7f6ff7b 100644 --- a/pkg/proxy/router/slots.go +++ b/pkg/proxy/router/slots.go @@ -7,9 +7,9 @@ import ( "fmt" "sync" - "github.com/wandoulabs/codis/pkg/proxy/redis" - "github.com/wandoulabs/codis/pkg/utils/errors" - "github.com/wandoulabs/codis/pkg/utils/log" + "github.com/CodisLabs/codis/pkg/proxy/redis" + "github.com/CodisLabs/codis/pkg/utils/errors" + "github.com/CodisLabs/codis/pkg/utils/log" ) type Slot struct { diff --git a/pkg/proxy/router/stats.go b/pkg/proxy/router/stats.go index 124cd5c99..bdc29fe1b 100644 --- a/pkg/proxy/router/stats.go +++ b/pkg/proxy/router/stats.go @@ -7,7 +7,7 @@ import ( "sync" "time" - "github.com/wandoulabs/codis/pkg/utils/sync2/atomic2" + "github.com/CodisLabs/codis/pkg/utils/sync2/atomic2" ) type opStats struct { diff --git a/pkg/topom/config.go b/pkg/topom/config.go index 1e51cf631..f1d0736d2 100644 --- a/pkg/topom/config.go +++ b/pkg/topom/config.go @@ -8,8 +8,8 @@ import ( "github.com/BurntSushi/toml" - "github.com/wandoulabs/codis/pkg/utils/errors" - "github.com/wandoulabs/codis/pkg/utils/log" + "github.com/CodisLabs/codis/pkg/utils/errors" + "github.com/CodisLabs/codis/pkg/utils/log" ) const DefaultConfig = ` diff --git a/pkg/topom/context.go b/pkg/topom/context.go index 2e4ddf1d0..f296bdf5e 100644 --- a/pkg/topom/context.go +++ b/pkg/topom/context.go @@ -4,10 +4,10 @@ package topom import ( - "github.com/wandoulabs/codis/pkg/models" - "github.com/wandoulabs/codis/pkg/utils" - "github.com/wandoulabs/codis/pkg/utils/errors" - "github.com/wandoulabs/codis/pkg/utils/log" + "github.com/CodisLabs/codis/pkg/models" + "github.com/CodisLabs/codis/pkg/utils" + "github.com/CodisLabs/codis/pkg/utils/errors" + "github.com/CodisLabs/codis/pkg/utils/log" ) type context struct { diff --git a/pkg/topom/context_test.go b/pkg/topom/context_test.go index 80a4aa19a..4a10a39ff 100644 --- a/pkg/topom/context_test.go +++ b/pkg/topom/context_test.go @@ -6,8 +6,8 @@ package topom import ( "testing" - "github.com/wandoulabs/codis/pkg/models" - "github.com/wandoulabs/codis/pkg/utils/assert" + "github.com/CodisLabs/codis/pkg/models" + "github.com/CodisLabs/codis/pkg/utils/assert" ) func TestSlotState(x *testing.T) { diff --git a/pkg/topom/redis.go b/pkg/topom/redis.go index 0960f7424..84846e197 100644 --- a/pkg/topom/redis.go +++ b/pkg/topom/redis.go @@ -13,7 +13,7 @@ import ( "github.com/garyburd/redigo/redis" - "github.com/wandoulabs/codis/pkg/utils/errors" + "github.com/CodisLabs/codis/pkg/utils/errors" ) var ErrFailedRedisClient = errors.New("use of failed redis client") diff --git a/pkg/topom/topom.go b/pkg/topom/topom.go index 902bdf699..533d152a0 100644 --- a/pkg/topom/topom.go +++ b/pkg/topom/topom.go @@ -13,12 +13,12 @@ import ( "sync" "time" - "github.com/wandoulabs/codis/pkg/models" - "github.com/wandoulabs/codis/pkg/utils" - "github.com/wandoulabs/codis/pkg/utils/errors" - "github.com/wandoulabs/codis/pkg/utils/log" - "github.com/wandoulabs/codis/pkg/utils/rpc" - "github.com/wandoulabs/codis/pkg/utils/sync2/atomic2" + "github.com/CodisLabs/codis/pkg/models" + "github.com/CodisLabs/codis/pkg/utils" + "github.com/CodisLabs/codis/pkg/utils/errors" + "github.com/CodisLabs/codis/pkg/utils/log" + "github.com/CodisLabs/codis/pkg/utils/rpc" + "github.com/CodisLabs/codis/pkg/utils/sync2/atomic2" ) type Topom struct { diff --git a/pkg/topom/topom_action.go b/pkg/topom/topom_action.go index fa8da04c2..4a39b9e2e 100644 --- a/pkg/topom/topom_action.go +++ b/pkg/topom/topom_action.go @@ -6,7 +6,7 @@ package topom import ( "time" - "github.com/wandoulabs/codis/pkg/utils/log" + "github.com/CodisLabs/codis/pkg/utils/log" ) func (s *Topom) ProcessSlotAction() error { diff --git a/pkg/topom/topom_action_test.go b/pkg/topom/topom_action_test.go index cbac6e336..1fc59c529 100644 --- a/pkg/topom/topom_action_test.go +++ b/pkg/topom/topom_action_test.go @@ -6,8 +6,8 @@ package topom import ( "testing" - "github.com/wandoulabs/codis/pkg/models" - "github.com/wandoulabs/codis/pkg/utils/assert" + "github.com/CodisLabs/codis/pkg/models" + "github.com/CodisLabs/codis/pkg/utils/assert" ) func TestSlotAction(x *testing.T) { diff --git a/pkg/topom/topom_api.go b/pkg/topom/topom_api.go index c1b78c746..f44c47f08 100644 --- a/pkg/topom/topom_api.go +++ b/pkg/topom/topom_api.go @@ -17,11 +17,11 @@ import ( "github.com/martini-contrib/gzip" "github.com/martini-contrib/render" - "github.com/wandoulabs/codis/pkg/models" - "github.com/wandoulabs/codis/pkg/utils" - "github.com/wandoulabs/codis/pkg/utils/errors" - "github.com/wandoulabs/codis/pkg/utils/log" - "github.com/wandoulabs/codis/pkg/utils/rpc" + "github.com/CodisLabs/codis/pkg/models" + "github.com/CodisLabs/codis/pkg/utils" + "github.com/CodisLabs/codis/pkg/utils/errors" + "github.com/CodisLabs/codis/pkg/utils/log" + "github.com/CodisLabs/codis/pkg/utils/rpc" ) type apiServer struct { diff --git a/pkg/topom/topom_api_test.go b/pkg/topom/topom_api_test.go index 72f442e90..e6dbe5b7b 100644 --- a/pkg/topom/topom_api_test.go +++ b/pkg/topom/topom_api_test.go @@ -6,9 +6,9 @@ package topom import ( "testing" - "github.com/wandoulabs/codis/pkg/models" - "github.com/wandoulabs/codis/pkg/utils/assert" - "github.com/wandoulabs/codis/pkg/utils/log" + "github.com/CodisLabs/codis/pkg/models" + "github.com/CodisLabs/codis/pkg/utils/assert" + "github.com/CodisLabs/codis/pkg/utils/log" ) func newApiClient(t *Topom) *ApiClient { diff --git a/pkg/topom/topom_cache.go b/pkg/topom/topom_cache.go index 2840b8694..ef8dda95a 100644 --- a/pkg/topom/topom_cache.go +++ b/pkg/topom/topom_cache.go @@ -4,9 +4,9 @@ package topom import ( - "github.com/wandoulabs/codis/pkg/models" - "github.com/wandoulabs/codis/pkg/utils/errors" - "github.com/wandoulabs/codis/pkg/utils/log" + "github.com/CodisLabs/codis/pkg/models" + "github.com/CodisLabs/codis/pkg/utils/errors" + "github.com/CodisLabs/codis/pkg/utils/log" ) func (s *Topom) dirtySlotsCache(sid int) { diff --git a/pkg/topom/topom_cache_test.go b/pkg/topom/topom_cache_test.go index a93ec342f..8b85ffd4c 100644 --- a/pkg/topom/topom_cache_test.go +++ b/pkg/topom/topom_cache_test.go @@ -7,9 +7,9 @@ import ( "path/filepath" "testing" - "github.com/wandoulabs/codis/pkg/models" - "github.com/wandoulabs/codis/pkg/utils/assert" - "github.com/wandoulabs/codis/pkg/utils/errors" + "github.com/CodisLabs/codis/pkg/models" + "github.com/CodisLabs/codis/pkg/utils/assert" + "github.com/CodisLabs/codis/pkg/utils/errors" ) func TestSlotsCache(x *testing.T) { diff --git a/pkg/topom/topom_group.go b/pkg/topom/topom_group.go index f044a9529..d842cc0b5 100644 --- a/pkg/topom/topom_group.go +++ b/pkg/topom/topom_group.go @@ -6,9 +6,9 @@ package topom import ( "time" - "github.com/wandoulabs/codis/pkg/models" - "github.com/wandoulabs/codis/pkg/utils/errors" - "github.com/wandoulabs/codis/pkg/utils/log" + "github.com/CodisLabs/codis/pkg/models" + "github.com/CodisLabs/codis/pkg/utils/errors" + "github.com/CodisLabs/codis/pkg/utils/log" ) func (s *Topom) CreateGroup(gid int) error { diff --git a/pkg/topom/topom_group_test.go b/pkg/topom/topom_group_test.go index 3c57c2847..d0ab22e98 100644 --- a/pkg/topom/topom_group_test.go +++ b/pkg/topom/topom_group_test.go @@ -6,8 +6,8 @@ package topom import ( "testing" - "github.com/wandoulabs/codis/pkg/models" - "github.com/wandoulabs/codis/pkg/utils/assert" + "github.com/CodisLabs/codis/pkg/models" + "github.com/CodisLabs/codis/pkg/utils/assert" ) func getGroup(t *Topom, gid int) *models.Group { diff --git a/pkg/topom/topom_proxy.go b/pkg/topom/topom_proxy.go index bd469a093..48e2eec79 100644 --- a/pkg/topom/topom_proxy.go +++ b/pkg/topom/topom_proxy.go @@ -4,11 +4,11 @@ package topom import ( - "github.com/wandoulabs/codis/pkg/models" - "github.com/wandoulabs/codis/pkg/proxy" - "github.com/wandoulabs/codis/pkg/utils/errors" - "github.com/wandoulabs/codis/pkg/utils/log" - "github.com/wandoulabs/codis/pkg/utils/sync2" + "github.com/CodisLabs/codis/pkg/models" + "github.com/CodisLabs/codis/pkg/proxy" + "github.com/CodisLabs/codis/pkg/utils/errors" + "github.com/CodisLabs/codis/pkg/utils/log" + "github.com/CodisLabs/codis/pkg/utils/sync2" ) func (s *Topom) CreateProxy(addr string) error { diff --git a/pkg/topom/topom_proxy_test.go b/pkg/topom/topom_proxy_test.go index 3ea8d5c2a..ddabe5264 100644 --- a/pkg/topom/topom_proxy_test.go +++ b/pkg/topom/topom_proxy_test.go @@ -6,7 +6,7 @@ package topom import ( "testing" - "github.com/wandoulabs/codis/pkg/utils/assert" + "github.com/CodisLabs/codis/pkg/utils/assert" ) func TestCreateProxy(x *testing.T) { diff --git a/pkg/topom/topom_slots.go b/pkg/topom/topom_slots.go index 2c7519a8d..3f52336c2 100644 --- a/pkg/topom/topom_slots.go +++ b/pkg/topom/topom_slots.go @@ -4,9 +4,9 @@ package topom import ( - "github.com/wandoulabs/codis/pkg/models" - "github.com/wandoulabs/codis/pkg/utils/errors" - "github.com/wandoulabs/codis/pkg/utils/log" + "github.com/CodisLabs/codis/pkg/models" + "github.com/CodisLabs/codis/pkg/utils/errors" + "github.com/CodisLabs/codis/pkg/utils/log" ) func (s *Topom) SlotCreateAction(sid int, gid int) error { diff --git a/pkg/topom/topom_slots_test.go b/pkg/topom/topom_slots_test.go index 07ff1d92a..3b27f1af8 100644 --- a/pkg/topom/topom_slots_test.go +++ b/pkg/topom/topom_slots_test.go @@ -6,9 +6,9 @@ package topom import ( "testing" - "github.com/wandoulabs/codis/pkg/models" - "github.com/wandoulabs/codis/pkg/proxy" - "github.com/wandoulabs/codis/pkg/utils/assert" + "github.com/CodisLabs/codis/pkg/models" + "github.com/CodisLabs/codis/pkg/proxy" + "github.com/CodisLabs/codis/pkg/utils/assert" ) func getSlotMapping(t *Topom, sid int) *models.SlotMapping { diff --git a/pkg/topom/topom_stats.go b/pkg/topom/topom_stats.go index c85b90efd..bb444c772 100644 --- a/pkg/topom/topom_stats.go +++ b/pkg/topom/topom_stats.go @@ -6,10 +6,10 @@ package topom import ( "time" - "github.com/wandoulabs/codis/pkg/models" - "github.com/wandoulabs/codis/pkg/proxy" - "github.com/wandoulabs/codis/pkg/utils/rpc" - "github.com/wandoulabs/codis/pkg/utils/sync2" + "github.com/CodisLabs/codis/pkg/models" + "github.com/CodisLabs/codis/pkg/proxy" + "github.com/CodisLabs/codis/pkg/utils/rpc" + "github.com/CodisLabs/codis/pkg/utils/sync2" ) type RedisStats struct { diff --git a/pkg/topom/topom_stats_test.go b/pkg/topom/topom_stats_test.go index cf35c47e3..fb569c615 100644 --- a/pkg/topom/topom_stats_test.go +++ b/pkg/topom/topom_stats_test.go @@ -10,10 +10,10 @@ import ( "testing" "time" - "github.com/wandoulabs/codis/pkg/models" - "github.com/wandoulabs/codis/pkg/proxy/redis" - "github.com/wandoulabs/codis/pkg/utils/assert" - "github.com/wandoulabs/codis/pkg/utils/log" + "github.com/CodisLabs/codis/pkg/models" + "github.com/CodisLabs/codis/pkg/proxy/redis" + "github.com/CodisLabs/codis/pkg/utils/assert" + "github.com/CodisLabs/codis/pkg/utils/log" ) func TestFakeServer(x *testing.T) { diff --git a/pkg/topom/topom_test.go b/pkg/topom/topom_test.go index 7d206ee27..03ee8561b 100644 --- a/pkg/topom/topom_test.go +++ b/pkg/topom/topom_test.go @@ -6,10 +6,10 @@ package topom import ( "testing" - "github.com/wandoulabs/codis/pkg/models" - "github.com/wandoulabs/codis/pkg/proxy" - "github.com/wandoulabs/codis/pkg/utils/assert" - "github.com/wandoulabs/codis/pkg/utils/log" + "github.com/CodisLabs/codis/pkg/models" + "github.com/CodisLabs/codis/pkg/proxy" + "github.com/CodisLabs/codis/pkg/utils/assert" + "github.com/CodisLabs/codis/pkg/utils/log" ) var config = NewDefaultConfig() diff --git a/pkg/utils/args.go b/pkg/utils/args.go index 8937bd852..218d9134c 100644 --- a/pkg/utils/args.go +++ b/pkg/utils/args.go @@ -6,7 +6,7 @@ package utils import ( "strconv" - "github.com/wandoulabs/codis/pkg/utils/log" + "github.com/CodisLabs/codis/pkg/utils/log" ) func Argument(d map[string]interface{}, name string) (string, bool) { diff --git a/pkg/utils/assert/assert.go b/pkg/utils/assert/assert.go index da07436aa..34b2d7dbf 100644 --- a/pkg/utils/assert/assert.go +++ b/pkg/utils/assert/assert.go @@ -3,7 +3,7 @@ package assert -import "github.com/wandoulabs/codis/pkg/utils/log" +import "github.com/CodisLabs/codis/pkg/utils/log" func Must(b bool) { if b { diff --git a/pkg/utils/errors/errors.go b/pkg/utils/errors/errors.go index ed4b367f4..153af04e3 100644 --- a/pkg/utils/errors/errors.go +++ b/pkg/utils/errors/errors.go @@ -7,7 +7,7 @@ import ( "errors" "fmt" - "github.com/wandoulabs/codis/pkg/utils/trace" + "github.com/CodisLabs/codis/pkg/utils/trace" ) var TraceEnabled = true diff --git a/pkg/utils/log/log.go b/pkg/utils/log/log.go index 0c196ab00..c7af07cca 100644 --- a/pkg/utils/log/log.go +++ b/pkg/utils/log/log.go @@ -13,8 +13,8 @@ import ( "sync" "sync/atomic" - "github.com/wandoulabs/codis/pkg/utils/errors" - "github.com/wandoulabs/codis/pkg/utils/trace" + "github.com/CodisLabs/codis/pkg/utils/errors" + "github.com/CodisLabs/codis/pkg/utils/trace" ) const ( diff --git a/pkg/utils/log/rolling.go b/pkg/utils/log/rolling.go index b589b530c..536073d37 100644 --- a/pkg/utils/log/rolling.go +++ b/pkg/utils/log/rolling.go @@ -11,7 +11,7 @@ import ( "sync" "time" - "github.com/wandoulabs/codis/pkg/utils/errors" + "github.com/CodisLabs/codis/pkg/utils/errors" ) type rollingFile struct { diff --git a/pkg/utils/rpc/api.go b/pkg/utils/rpc/api.go index a6ff7e11e..742ea16d1 100644 --- a/pkg/utils/rpc/api.go +++ b/pkg/utils/rpc/api.go @@ -15,10 +15,10 @@ import ( "strconv" "time" - "github.com/wandoulabs/codis/pkg/utils/errors" - "github.com/wandoulabs/codis/pkg/utils/log" - "github.com/wandoulabs/codis/pkg/utils/sync2/atomic2" - "github.com/wandoulabs/codis/pkg/utils/trace" + "github.com/CodisLabs/codis/pkg/utils/errors" + "github.com/CodisLabs/codis/pkg/utils/log" + "github.com/CodisLabs/codis/pkg/utils/sync2/atomic2" + "github.com/CodisLabs/codis/pkg/utils/trace" ) const ( diff --git a/pkg/utils/utils.go b/pkg/utils/utils.go index 2bca82738..ad10ed82c 100644 --- a/pkg/utils/utils.go +++ b/pkg/utils/utils.go @@ -8,7 +8,7 @@ import ( "regexp" "time" - "github.com/wandoulabs/codis/pkg/utils/errors" + "github.com/CodisLabs/codis/pkg/utils/errors" ) func MaxInt(a, b int) int {