From f65c89fd941374b2724bb0e73083ff89a1ffee3e Mon Sep 17 00:00:00 2001 From: ZHAO Yijun Date: Thu, 9 Aug 2018 19:03:32 +0800 Subject: [PATCH 1/7] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a7f6d63..3d42959 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ A proxy for [Gobeansdb](https://github.com/douban/gobeansdb). ## Prepare -GoBeansDB use `vgo` manage dependencies, please install [vgo](https://godoc.org/golang.org/x/vgo) first. +GoBeansProxy use `vgo` manage dependencies, please install [vgo](https://godoc.org/golang.org/x/vgo) first. ## Install From 22d736273ab27b23fd144577f9082dd3a580ad4e Mon Sep 17 00:00:00 2001 From: ZHAO Yijun Date: Wed, 15 Aug 2018 16:33:35 +0800 Subject: [PATCH 2/7] fix vgo build --- Makefile | 15 ++++++++++++--- README.md | 6 +++--- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 5e1c0be..3c2a281 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,18 @@ all:install -GOPATH:=$(CURDIR)/../../../../ -export GOPATH export PYTHONPATH=. +# FIXME: When this issue is done(https://github.com/golang/go/issues/23965#issuecomment-409232583) +# Determine the compiler and version +COMPILER_HELP := $(shell $(CC) --help | head -n 1) +ifneq (,$(findstring clang,$(COMPILER_HELP))) + COMPILER = clang +else ifneq (,$(findstring gcc,$(COMPILER_HELP))) + COMPILER = gcc +else + COMPILER = unknown +endif + test: ./misc/gobeansdb_server.sh start go version @@ -19,4 +28,4 @@ pytest:install ./tests/run_test.sh install: - vgo install github.com/douban/gobeansproxy + CC=$(COMPILER) vgo install ./ diff --git a/README.md b/README.md index 3d42959..900b3cc 100644 --- a/README.md +++ b/README.md @@ -5,13 +5,13 @@ A proxy for [Gobeansdb](https://github.com/douban/gobeansdb). ## Prepare GoBeansProxy use `vgo` manage dependencies, please install [vgo](https://godoc.org/golang.org/x/vgo) first. +Supported Go version: 1.10.1+ ## Install ``` -$ cd ${GOPATH} -$ git clone http://github.com/douban/gobeansproxy.git src/github.com/douban/gobeansproxy -$ cd src/github.com/douban/gobeansproxy +$ git clone http://github.com/douban/gobeansproxy.git +$ cd gobeansproxy $ make ``` From a81a89ac6edf18d5ce963479a83aa0ab7e283281 Mon Sep 17 00:00:00 2001 From: ZHAO Yijun Date: Wed, 15 Aug 2018 17:09:42 +0800 Subject: [PATCH 3/7] update go.mod --- go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 78c8db1..7894a06 100644 --- a/go.mod +++ b/go.mod @@ -2,7 +2,7 @@ module github.com/douban/gobeansproxy require ( github.com/davecgh/go-spew v1.1.0 // indirect - github.com/douban/gobeansdb v0.0.0-20180809060252-7f57d32485c3 + github.com/douban/gobeansdb v1.0.1 github.com/pmezard/go-difflib v1.0.0 // indirect github.com/stretchr/testify v1.2.2 gopkg.in/yaml.v2 v2.2.1 From 22815af307ac492a06995c33ba9db5596e960459 Mon Sep 17 00:00:00 2001 From: ZHAO Yijun Date: Tue, 28 Aug 2018 14:57:11 +0800 Subject: [PATCH 4/7] update ci (#3) --- .travis.yml | 9 ++++++--- Makefile | 6 +++--- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index a90a55e..01be3f1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,14 +5,17 @@ os: - osx go: - - "1.10" - - master + - "1.10.x" + - "1.11.x" + +env: + - GO111MODULE=on before_install: - pip install --user -r tests/pip-req.txt install: - - go get -u golang.org/x/vgo + - go get -t -v ./... - go get -u golang.org/x/tools/cmd/goimports - go get -u github.com/douban/gobeansdb diff --git a/Makefile b/Makefile index 3c2a281..026baf0 100644 --- a/Makefile +++ b/Makefile @@ -16,8 +16,8 @@ endif test: ./misc/gobeansdb_server.sh start go version - vgo test github.com/douban/gobeansproxy/config - vgo test github.com/douban/gobeansproxy/dstore + go test github.com/douban/gobeansproxy/config + go test github.com/douban/gobeansproxy/dstore ./misc/gobeansdb_server.sh stop template: @@ -28,4 +28,4 @@ pytest:install ./tests/run_test.sh install: - CC=$(COMPILER) vgo install ./ + CC=$(COMPILER) go install ./ From fb515a5cef76aa1e70fa210d2bad95103383f0c5 Mon Sep 17 00:00:00 2001 From: ZHAO Yijun Date: Mon, 10 Dec 2018 14:27:12 +0800 Subject: [PATCH 5/7] modify readme (#5) --- .gitignore | 1 + README.md | 4 ++++ config/config.go | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 4b69ad1..2f65b0f 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ *.log unittest.xml venv/ +vendor/ .idea/ main go.sum diff --git a/README.md b/README.md index 900b3cc..0ce4df3 100644 --- a/README.md +++ b/README.md @@ -24,5 +24,9 @@ $ make test # unit test ## run ``` +# Run with conf +$ ${GOPATH}/bin/proxy -confdir pathToConfDir + +# Others $ ${GOPATH}/bin/proxy -h ``` diff --git a/config/config.go b/config/config.go index b2580e7..e56e7c1 100644 --- a/config/config.go +++ b/config/config.go @@ -9,7 +9,7 @@ import ( ) const ( - Version = "1.0.0.8" + Version = "v1.0.2" ) var ( From a59a04f8d1406fb6671a6d62ed8bf84c24106422 Mon Sep 17 00:00:00 2001 From: ZHAO Date: Fri, 11 Oct 2019 16:42:27 +0800 Subject: [PATCH 6/7] upgrade makefile --- .gitignore | 2 +- Makefile | 1 + go.mod | 4 +++- go.sum | 15 +++++++++++++++ 4 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 go.sum diff --git a/.gitignore b/.gitignore index 2f65b0f..69a8060 100644 --- a/.gitignore +++ b/.gitignore @@ -7,4 +7,4 @@ venv/ vendor/ .idea/ main -go.sum +vendor/ diff --git a/Makefile b/Makefile index 026baf0..3ee05a5 100644 --- a/Makefile +++ b/Makefile @@ -28,4 +28,5 @@ pytest:install ./tests/run_test.sh install: + GO111MODULE=on go mod vendor CC=$(COMPILER) go install ./ diff --git a/go.mod b/go.mod index 7894a06..b22b547 100644 --- a/go.mod +++ b/go.mod @@ -2,8 +2,10 @@ module github.com/douban/gobeansproxy require ( github.com/davecgh/go-spew v1.1.0 // indirect - github.com/douban/gobeansdb v1.0.1 + github.com/douban/gobeansdb v1.1.0 github.com/pmezard/go-difflib v1.0.0 // indirect github.com/stretchr/testify v1.2.2 gopkg.in/yaml.v2 v2.2.1 ) + +go 1.13 diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..89bf573 --- /dev/null +++ b/go.sum @@ -0,0 +1,15 @@ +github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/douban/gobeansdb v1.1.0 h1:Ia659+3inop0LFeS8/aLFM7mEcJ0hdX0fcIGrZC1aDw= +github.com/douban/gobeansdb v1.1.0/go.mod h1:1Irour4eUljC+P/4aD6qI1z9zWao4IzQYJmfuRqcH7o= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/samuel/go-zookeeper v0.0.0-20180130194729-c4fab1ac1bec h1:6ncX5ko6B9LntYM0YBRXkiSaZMmLYeZ/NWcmeB43mMY= +github.com/samuel/go-zookeeper v0.0.0-20180130194729-c4fab1ac1bec/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= +github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= +github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v2 v2.2.1 h1:mUhvW9EsL+naU5Q3cakzfE91YhliOondGd6ZrsDBHQE= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= From e75841fc20a2331a0c235a664f8c89235e5e41dc Mon Sep 17 00:00:00 2001 From: Yijun Zhao Date: Fri, 11 Oct 2019 17:47:28 +0800 Subject: [PATCH 7/7] upgrade travis ci (#7) --- .travis.yml | 7 ++++--- Makefile | 13 +------------ README.md | 3 +-- dstore/scheduler.go | 2 +- 4 files changed, 7 insertions(+), 18 deletions(-) diff --git a/.travis.yml b/.travis.yml index 01be3f1..088d336 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,8 +5,9 @@ os: - osx go: - - "1.10.x" - "1.11.x" + - "1.12.x" + - "1.13.x" env: - GO111MODULE=on @@ -15,10 +16,10 @@ before_install: - pip install --user -r tests/pip-req.txt install: - - go get -t -v ./... - go get -u golang.org/x/tools/cmd/goimports - - go get -u github.com/douban/gobeansdb script: - diff <(goimports -d .) <(printf "") + - make install + - go get -u github.com/douban/gobeansdb - make test diff --git a/Makefile b/Makefile index 3ee05a5..4fb8891 100644 --- a/Makefile +++ b/Makefile @@ -2,17 +2,6 @@ all:install export PYTHONPATH=. -# FIXME: When this issue is done(https://github.com/golang/go/issues/23965#issuecomment-409232583) -# Determine the compiler and version -COMPILER_HELP := $(shell $(CC) --help | head -n 1) -ifneq (,$(findstring clang,$(COMPILER_HELP))) - COMPILER = clang -else ifneq (,$(findstring gcc,$(COMPILER_HELP))) - COMPILER = gcc -else - COMPILER = unknown -endif - test: ./misc/gobeansdb_server.sh start go version @@ -29,4 +18,4 @@ pytest:install install: GO111MODULE=on go mod vendor - CC=$(COMPILER) go install ./ + go install ./ diff --git a/README.md b/README.md index 0ce4df3..813d5ec 100644 --- a/README.md +++ b/README.md @@ -4,8 +4,7 @@ A proxy for [Gobeansdb](https://github.com/douban/gobeansdb). ## Prepare -GoBeansProxy use `vgo` manage dependencies, please install [vgo](https://godoc.org/golang.org/x/vgo) first. -Supported Go version: 1.10.1+ +Supported Go version: > 1.11.0 ## Install diff --git a/dstore/scheduler.go b/dstore/scheduler.go index ef53917..372e8ba 100644 --- a/dstore/scheduler.go +++ b/dstore/scheduler.go @@ -255,7 +255,7 @@ func (sch *ManualScheduler) checkFailsForBucket(bucket *Bucket) { } else { logger.Infof( "beansdb server %s in Bucket %X's Down while check fails , err is %s", - hostBucket.host.Addr, bucket, err) + hostBucket.host.Addr, bucket.ID, err) } } }