Monthly Archives: May 2015

pt-osc chunking handles multi-column indexes poorly

By | 2015/05/21

最近使用工具 pt-osc (pt-online-schema-change) 对一张约200w记录多列组成的唯一索引的表进行更改索引操作, 在第一条 chunk 操作的时候就开始报错(版本 pt 2.2.7 和 pt 2.2.11), 如下所示: [root@cz table_check]# pt-online-schema-change –alter=”drop key idx_guux, add unique key idx_ugux(user_id,goods_id,updatetime,keycode)” A=utf8,h=cz1,P=3306,D=mybase,t=test –ask-pass –execute –nocheck-replication-filters Enter MySQL password: Found 1 slaves: cz2 Will check slave lag on: cz2 Operation, tries, wait: copy_rows, 10, 0.25 create_triggers, 10, 1 drop_triggers, 10, 1 swap_tables, 10, 1… Read More »

lvs DR模式均衡读请求

By | 2015/05/20

env环境: Director IP: 10.0.21.100 vitrual IP: 10.0.21.222 Real server1: 10.0.21.7 Real server2: 10.0.21.17 Director配置: net.ipv4.ip_forward = 1 # 开启ip转发 ip addr add 10.0.21.222/32 dev eth0; arping -c 3 -U 10.0.21.222 -I eth0 #配置vip并通告网络 ipvsadm -A -t 10.0.21.222:3301 -s rr #选择轮询调度模式 ipvsadm -a -t 10.0.21.222:3301 -r 10.0.21.7:3301 -g ipvsadm -a -t 10.0.21.222:3301 -r 10.0.21.17:3301 -g ipvsadm-save… Read More »