{"action":"created","issue":{"url":"https://api.github.com/repos/wandoulabs/codis/issues/426","labels_url":"https://api.github.com/repos/wandoulabs/codis/issues/426/labels{/name}","comments_url":"https://api.github.com/repos/wandoulabs/codis/issues/426/comments","events_url":"https://api.github.com/repos/wandoulabs/codis/issues/426/events","html_url":"https://github.com/wandoulabs/codis/issues/426","id":105956640,"number":426,"title":"slot migrate 速率问题","user":{"login":"wangbeng","id":13637471,"avatar_url":"https://avatars.githubusercontent.com/u/13637471?v=3","gravatar_id":"","url":"https://api.github.com/users/wangbeng","html_url":"https://github.com/wangbeng","followers_url":"https://api.github.com/users/wangbeng/followers","following_url":"https://api.github.com/users/wangbeng/following{/other_user}","gists_url":"https://api.github.com/users/wangbeng/gists{/gist_id}","starred_url":"https://api.github.com/users/wangbeng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wangbeng/subscriptions","organizations_url":"https://api.github.com/users/wangbeng/orgs","repos_url":"https://api.github.com/users/wangbeng/repos","events_url":"https://api.github.com/users/wangbeng/events{/privacy}","received_events_url":"https://api.github.com/users/wangbeng/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":19,"created_at":"2015-09-11T07:12:04Z","updated_at":"2015-09-11T08:24:50Z","closed_at":null,"body":"做了一个slot的migrate，迁移一般的slot从group 1到group 2,512 - 1023 \r\n2015/09/10 14:54:32 migrate_task.go:135: [INFO] migration start: {SlotId:512 NewGroupId:2 Delay:0 CreateAt:1441866450 Percent:0 Status:pending Id:0000000000}\r\n2015/09/10 14:56:22 migrate_task.go:115: [INFO] migrate Slot: slot_512 From: group_1 To: group_2 remain: 0 keys\r\n2015/09/10 14:56:43 migrate_task.go:146: [INFO] migration finished: {SlotId:512 NewGroupId:2 }\r\n\r\n2015/09/11 15:02:08 migrate_task.go:115: [INFO] migrate Slot: slot_671 From: group_1 To: group_2 remain: 0 keys\r\n2015/09/11 15:02:34 migrate_task.go:146: [INFO] migration finished: {SlotId:671 NewGroupId:2 Delay:0 CreateAt:1441866646 Percent:0 Status:finished Id:0000000159}\r\n\r\n一天的时间迁移了160个slot，是否迁移效率有问题？自身数据量并不大。\r\n中间采取过访问集群中所有key的方式想加快迁移，但是没有效果。"},"comment":{"url":"https://api.github.com/repos/wandoulabs/codis/issues/comments/139482730","html_url":"https://github.com/wandoulabs/codis/issues/426#issuecomment-139482730","issue_url":"https://api.github.com/repos/wandoulabs/codis/issues/426","id":139482730,"user":{"login":"wangbeng","id":13637471,"avatar_url":"https://avatars.githubusercontent.com/u/13637471?v=3","gravatar_id":"","url":"https://api.github.com/users/wangbeng","html_url":"https://github.com/wangbeng","followers_url":"https://api.github.com/users/wangbeng/followers","following_url":"https://api.github.com/users/wangbeng/following{/other_user}","gists_url":"https://api.github.com/users/wangbeng/gists{/gist_id}","starred_url":"https://api.github.com/users/wangbeng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wangbeng/subscriptions","organizations_url":"https://api.github.com/users/wangbeng/orgs","repos_url":"https://api.github.com/users/wangbeng/repos","events_url":"https://api.github.com/users/wangbeng/events{/privacy}","received_events_url":"https://api.github.com/users/wangbeng/received_events","type":"User","site_admin":false},"created_at":"2015-09-11T08:24:50Z","updated_at":"2015-09-11T08:24:50Z","body":"好的，slot 671 \r\ndashboard.log\r\n2015/09/11 15:02:08 migrate_task.go:115: [INFO] migrate Slot: slot_671 From: group_1 To: group_2 remain: 0 keys\r\n2015/09/11 15:02:34 migrate_task.go:146: [INFO] migration finished: {SlotId:671 NewGroupId:2 Delay:0 CreateAt:1441866646 Percent:0 Status:finished Id:0000000159}\r\n2015/09/11 15:37:32 migrate_task.go:135: [INFO] migration start: {SlotId:672 NewGroupId:2 Delay:0 CreateAt:1441866648 Percent:0 Status:pending Id:0000000160}\r\n\r\nproxy.log\r\n2015/09/11 15:00:52 topology.go:150: [WARN] topo event {Type:EventNodeChildrenChanged State:StateSyncConnected Path:/zk/codis/db_test/actions Err:<nil>}\r\n2015/09/11 15:00:52 proxy.go:426: [INFO] got event kugou_proxy_3, {EventNodeChildrenChanged StateSyncConnected /zk/codis/db_test/actions <nil>}, lastActionSeq 3346\r\n2015/09/11 15:00:53 proxy.go:330: [WARN] action 3348 receivers [{\"id\":\"kugou_proxy_3\",\"addr\":\"ZhongNeng_10_1_18_168:19000\",\"last_event\":\"\",\"last_event_ts\":0,\"state\":\"online\",\"description\":\"\",\"debug_var_addr\":\"ZhongNeng_10_1_18_168:11000\",\"pid\":38382,\"start_at\":\"2015-09-10 11:14:57.760945628 +0800 CST\"}]\r\n2015/09/11 15:00:55 proxy.go:317: [INFO] action &{Type:slot_changed Desc: Target:{\r\n  \"product_name\": \"test\",\r\n  \"id\": 671,\r\n  \"group_id\": 1,\r\n  \"state\": {\r\n    \"status\": \"pre_migrate\",\r\n    \"migrate_status\": {\r\n      \"from\": -1,\r\n      \"to\": -1\r\n    },\r\n    \"last_op_ts\": \"0\"\r\n  }\r\n} Ts:1441954836 Receivers:[{\"id\":\"kugou_proxy_3\",\"addr\":\"ZhongNeng_10_1_18_168:19000\",\"last_event\":\"\",\"last_event_ts\":0,\"state\":\"online\",\"description\":\"\",\"debug_var_addr\":\"ZhongNeng_10_1_18_168:11000\",\"pid\":38382,\"start_at\":\"2015-09-10 11:14:57.760945628 +0800 CST\"}]}\r\n2015/09/11 15:00:58 router.go:167: [INFO] fill slot 0671, backend.addr = 10.1.33.43:6380\r\n2015/09/11 15:00:58 proxy.go:304: [INFO] send response seq = 3348\r\n2015/09/11 15:01:14 topology.go:150: [WARN] topo event {Type:EventNodeChildrenChanged State:StateSyncConnected Path:/zk/codis/db_test/actions Err:<nil>}\r\n2015/09/11 15:01:14 proxy.go:426: [INFO] got event kugou_proxy_3, {EventNodeChildrenChanged StateSyncConnected /zk/codis/db_test/actions <nil>}, lastActionSeq 3348\r\n2015/09/11 15:01:16 proxy.go:330: [WARN] action 3350 receivers [{\"id\":\"kugou_proxy_3\",\"addr\":\"ZhongNeng_10_1_18_168:19000\",\"last_event\":\"\",\"last_event_ts\":0,\"state\":\"online\",\"description\":\"\",\"debug_var_addr\":\"ZhongNeng_10_1_18_168:11000\",\"pid\":38382,\"start_at\":\"2015-09-10 11:14:57.760945628 +0800 CST\"}]\r\n2015/09/11 15:01:17 proxy.go:317: [INFO] action &{Type:slot_premigrate Desc: Target:{\r\n  \"product_name\": \"test\",\r\n  \"id\": 671,\r\n  \"group_id\": 1,\r\n  \"state\": {\r\n    \"status\": \"pre_migrate\",\r\n    \"migrate_status\": {\r\n      \"from\": -1,\r\n      \"to\": -1\r\n    },\r\n    \"last_op_ts\": \"0\"\r\n  }\r\n} Ts:1441954859 Receivers:[{\"id\":\"kugou_proxy_3\",\"addr\":\"ZhongNeng_10_1_18_168:19000\",\"last_event\":\"\",\"last_event_ts\":0,\"state\":\"online\",\"description\":\"\",\"debug_var_addr\":\"ZhongNeng_10_1_18_168:11000\",\"pid\":38382,\"start_at\":\"2015-09-10 11:14:57.760945628 +0800 CST\"}]}\r\n2015/09/11 15:01:20 router.go:167: [INFO] fill slot 0671, backend.addr = 10.1.33.43:6380\r\n2015/09/11 15:01:20 proxy.go:304: [INFO] send response seq = 3350\r\n2015/09/11 15:01:40 topology.go:150: [WARN] topo event {Type:EventNodeChildrenChanged State:StateSyncConnected Path:/zk/codis/db_test/actions Err:<nil>}\r\n2015/09/11 15:01:40 proxy.go:426: [INFO] got event kugou_proxy_3, {EventNodeChildrenChanged StateSyncConnected /zk/codis/db_test/actions <nil>}, lastActionSeq 3350\r\n2015/09/11 15:01:41 proxy.go:330: [WARN] action 3352 receivers [{\"id\":\"kugou_proxy_3\",\"addr\":\"ZhongNeng_10_1_18_168:19000\",\"last_event\":\"\",\"last_event_ts\":0,\"state\":\"online\",\"description\":\"\",\"debug_var_addr\":\"ZhongNeng_10_1_18_168:11000\",\"pid\":38382,\"start_at\":\"2015-09-10 11:14:57.760945628 +0800 CST\"}]\r\n2015/09/11 15:01:43 proxy.go:317: [INFO] action &{Type:slot_migrate Desc: Target:{\r\n  \"product_name\": \"test\",\r\n  \"id\": 671,\r\n  \"group_id\": 2,\r\n  \"state\": {\r\n    \"status\": \"migrate\",\r\n    \"migrate_status\": {\r\n      \"from\": 1,\r\n      \"to\": 2\r\n    },\r\n    \"last_op_ts\": \"0\"\r\n  }\r\n} Ts:1441954885 Receivers:[{\"id\":\"kugou_proxy_3\",\"addr\":\"ZhongNeng_10_1_18_168:19000\",\"last_event\":\"\",\"last_event_ts\":0,\"state\":\"online\",\"description\":\"\",\"debug_var_addr\":\"ZhongNeng_10_1_18_168:11000\",\"pid\":38382,\"start_at\":\"2015-09-10 11:14:57.760945628 +0800 CST\"}]}\r\n2015/09/11 15:01:49 router.go:164: [INFO] fill slot 0671, backend.addr = 10.1.33.45:6380, migrate.from = 10.1.33.43:6380\r\n2015/09/11 15:01:49 proxy.go:304: [INFO] send response seq = 3352\r\n2015/09/11 15:02:26 topology.go:150: [WARN] topo event {Type:EventNodeChildrenChanged State:StateSyncConnected Path:/zk/codis/db_test/actions Err:<nil>}\r\n2015/09/11 15:02:26 proxy.go:426: [INFO] got event kugou_proxy_3, {EventNodeChildrenChanged StateSyncConnected /zk/codis/db_test/actions <nil>}, lastActionSeq 3352\r\n2015/09/11 15:02:28 proxy.go:330: [WARN] action 3354 receivers [{\"id\":\"kugou_proxy_3\",\"addr\":\"ZhongNeng_10_1_18_168:19000\",\"last_event\":\"\",\"last_event_ts\":0,\"state\":\"online\",\"description\":\"\",\"debug_var_addr\":\"ZhongNeng_10_1_18_168:11000\",\"pid\":38382,\"start_at\":\"2015-09-10 11:14:57.760945628 +0800 CST\"}]\r\n2015/09/11 15:02:29 proxy.go:317: [INFO] action &{Type:slot_changed Desc: Target:{\r\n  \"product_name\": \"test\",\r\n  \"id\": 671,\r\n  \"group_id\": 2,\r\n  \"state\": {\r\n    \"status\": \"online\",\r\n    \"migrate_status\": {\r\n      \"from\": -1,\r\n      \"to\": -1\r\n    },\r\n    \"last_op_ts\": \"0\"\r\n  }\r\n} Ts:1441954931 Receivers:[{\"id\":\"kugou_proxy_3\",\"addr\":\"ZhongNeng_10_1_18_168:19000\",\"last_event\":\"\",\"last_event_ts\":0,\"state\":\"online\",\"description\":\"\",\"debug_var_addr\":\"ZhongNeng_10_1_18_168:11000\",\"pid\":38382,\"start_at\":\"2015-09-10 11:14:57.760945628 +0800 CST\"}]}\r\n2015/09/11 15:02:32 router.go:167: [INFO] fill slot 0671, backend.addr = 10.1.33.45:6380\r\n2015/09/11 15:02:32 proxy.go:304: [INFO] send response seq = 3354\r\n"}}