{"action":"created","issue":{"url":"https://api.github.com/repos/wandoulabs/codis/issues/318","labels_url":"https://api.github.com/repos/wandoulabs/codis/issues/318/labels{/name}","comments_url":"https://api.github.com/repos/wandoulabs/codis/issues/318/comments","events_url":"https://api.github.com/repos/wandoulabs/codis/issues/318/events","html_url":"https://github.com/wandoulabs/codis/issues/318","id":94912228,"number":318,"title":"redis-port导入数据报错","user":{"login":"dennis-xie","id":13330409,"avatar_url":"https://avatars.githubusercontent.com/u/13330409?v=3","gravatar_id":"","url":"https://api.github.com/users/dennis-xie","html_url":"https://github.com/dennis-xie","followers_url":"https://api.github.com/users/dennis-xie/followers","following_url":"https://api.github.com/users/dennis-xie/following{/other_user}","gists_url":"https://api.github.com/users/dennis-xie/gists{/gist_id}","starred_url":"https://api.github.com/users/dennis-xie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dennis-xie/subscriptions","organizations_url":"https://api.github.com/users/dennis-xie/orgs","repos_url":"https://api.github.com/users/dennis-xie/repos","events_url":"https://api.github.com/users/dennis-xie/events{/privacy}","received_events_url":"https://api.github.com/users/dennis-xie/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2015-07-14T10:12:48Z","updated_at":"2015-07-14T13:49:52Z","closed_at":"2015-07-14T11:40:32Z","body":"./redis-port sync -n 1 -f 10.200.204.105:6379 -t 10.241.118.245:19000 \r\n2015/07/14 17:33:56 [INFO] set ncpu = 1, parallel = 1\r\n2015/07/14 17:33:56 [INFO] sync from '10.200.204.105:6379' to '10.241.118.245:19000'\r\n2015/07/14 17:33:57 [PANIC] read sync response = ''\r\n\\[error\\]:  EOF\r\n[stack]: \r\n    0   /data/go/src/github.com/wandoulabs/redis-port/cmd/utils.go:106\r\n            main.func·025\r\n        ... ...\r\n"},"comment":{"url":"https://api.github.com/repos/wandoulabs/codis/issues/comments/121242514","html_url":"https://github.com/wandoulabs/codis/issues/318#issuecomment-121242514","issue_url":"https://api.github.com/repos/wandoulabs/codis/issues/318","id":121242514,"user":{"login":"spinlock","id":722853,"avatar_url":"https://avatars.githubusercontent.com/u/722853?v=3","gravatar_id":"","url":"https://api.github.com/users/spinlock","html_url":"https://github.com/spinlock","followers_url":"https://api.github.com/users/spinlock/followers","following_url":"https://api.github.com/users/spinlock/following{/other_user}","gists_url":"https://api.github.com/users/spinlock/gists{/gist_id}","starred_url":"https://api.github.com/users/spinlock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spinlock/subscriptions","organizations_url":"https://api.github.com/users/spinlock/orgs","repos_url":"https://api.github.com/users/spinlock/repos","events_url":"https://api.github.com/users/spinlock/events{/privacy}","received_events_url":"https://api.github.com/users/spinlock/received_events","type":"User","site_admin":false},"created_at":"2015-07-14T13:49:52Z","updated_at":"2015-07-14T13:49:52Z","body":"+ redis-port 刚开始同步的时候，master 会生成一个 snapshot。redis port 的功能就是同步这个 snapshot 以及之后在 master 上产生的所有写操作。\r\n\r\n+ rdb sync done 表示 snapshot 同步完成。你看到 log 里面的 forward 表示同步的后续写指令的条数。\r\n\r\n+ forward 的值大致等于 master 的 QPS 并稳定一段时间之后，表示 codis 大致与 master 追平了。\r\n\r\n+ redis port 不会停止，直到旧的 master 下线，网络异常会导致 redis port 自己退出。所以有多少个 旧 redis 就需要有多少个 redis port 一直默默的同步，直到整个业务迁移到 codis 上来。\r\n\r\n+ 毕竟 redis port 的同步需要时间。所以如果写入很快，并且强调很强的一致性，建议同步完成时，先停写，再切服务到 codis 上来。"}}