-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
proxy can not start when use etcd #488
Comments
看上去是因为节点名前面补了一堆0导致的……00000000000000006167会被当成6167然后取不到 /zk/codis/db_test/actions/6167,似乎是因为etcd和zk行为不一致……我看看咋搞 |
懂了,etcd-io/etcd@a7b9bff 从这个版本开始,In-Order Keys自动生成的key补了一堆0…… |
因为是从2.2开始变成20位的,老版还是没有补0的,所以你可以先自己改本地的https://github.com/wandoulabs/zkhelper/blob/master/etcd.go#L32 这个代码,本地路径应该是$GOPATH/wandoulabs/zkhelper/blob/master/etcd.go 把%d改成%020d然后再编译……长期来看因为未来的版本会拿掉zk/etcd的依赖,就暂时不准备做大幅度修改以应对这个问题了…… |
可以工作了,谢谢,建议还是改一下,以免新手同样碰到,改动也不太:-) |
改动不会很小,因为得判断是旧版的etcd还是新版的,搞成可配置的或者自行判断,不是说直接加%020d就行的…… |
2015/10/19 17:01:17 proxy.go:120: [INFO] proxy is serving
2015/10/19 17:01:17 proxy.go:447: [INFO] got event proxy_1, {EventNodeChildrenChanged StateConnected /zk/codis/db_test/actions/00000000000000006167 }, lastActionSeq -1
2015/10/19 17:01:17 proxy.go:344: [PANIC] action failed, seq = 10
[error]: zk: node does not exist
6 /home/season/gowork/src/github.com/wandoulabs/codis/pkg/models/action.go:58
github.com/wandoulabs/codis/pkg/models.GetActionWithSeq
5 /home/season/gowork/src/github.com/wandoulabs/codis/pkg/proxy/topology.go:81
github.com/wandoulabs/codis/pkg/proxy.(_Topology).GetActionWithSeq
4 /home/season/gowork/src/github.com/wandoulabs/codis/pkg/proxy/proxy.go:342
github.com/wandoulabs/codis/pkg/proxy.(_Server).checkAndDoTopoChange
3 /home/season/gowork/src/github.com/wandoulabs/codis/pkg/proxy/proxy.go:427
github.com/wandoulabs/codis/pkg/proxy.(_Server).processAction
2 /home/season/gowork/src/github.com/wandoulabs/codis/pkg/proxy/proxy.go:459
github.com/wandoulabs/codis/pkg/proxy.(_Server).loopEvents
1 /home/season/gowork/src/github.com/wandoulabs/codis/pkg/proxy/proxy.go:126
github.com/wandoulabs/codis/pkg/proxy.(_Server).serve
0 /home/season/gowork/src/github.com/wandoulabs/codis/pkg/proxy/proxy.go:85
github.com/wandoulabs/codis/pkg/proxy.New.func1
... ...
[stack]:
4 /home/season/gowork/src/github.com/wandoulabs/codis/pkg/proxy/proxy.go:344
github.com/wandoulabs/codis/pkg/proxy.(_Server).checkAndDoTopoChange
3 /home/season/gowork/src/github.com/wandoulabs/codis/pkg/proxy/proxy.go:427
github.com/wandoulabs/codis/pkg/proxy.(_Server).processAction
2 /home/season/gowork/src/github.com/wandoulabs/codis/pkg/proxy/proxy.go:459
github.com/wandoulabs/codis/pkg/proxy.(_Server).loopEvents
1 /home/season/gowork/src/github.com/wandoulabs/codis/pkg/proxy/proxy.go:126
github.com/wandoulabs/codis/pkg/proxy.(*Server).serve
0 /home/season/gowork/src/github.com/wandoulabs/codis/pkg/proxy/proxy.go:85
github.com/wandoulabs/codis/pkg/proxy.New.func1
The text was updated successfully, but these errors were encountered: