Skip to content
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

Cut-over stage run into an error always, but not metadata lock #618

Open
ghost opened this issue Jul 27, 2018 · 2 comments
Open

Cut-over stage run into an error always, but not metadata lock #618

ghost opened this issue Jul 27, 2018 · 2 comments

Comments

@ghost
Copy link

ghost commented Jul 27, 2018

When I alter a table with gh-ost, it aways give me an error at cut-over stage. Details as follows,

Copy: 39004552/39004552 100.0%; Applied: 186405; Backlog: 100/100; Time: 23h47m15s(total), 8h47m59s(copy); streamer: binlog.010003:1002685155; State: migrating; ETA: due
[MySQL] 2018/07/27 09:38:09 packets.go:32: unexpected EOF
[MySQL] 2018/07/27 09:38:09 packets.go:118: write tcp 10.1.137.252:54600->10.1.137.252:3306: write: broken pipe
[MySQL] 2018/07/27 09:38:10 packets.go:32: unexpected EOF
[MySQL] 2018/07/27 09:38:10 statement.go:27: Invalid Connection
2018-07-27 09:38:10 ERROR driver: bad connection; query=
                        update /* gh-ost `copyright`.`_c_copyright_gho` */
                                        `copyright`.`_c_copyright_gho`
                                set
                                        `cid`=?, `singer`=?, `song`=?, `album`=?, `album_id`=?, `song_id`=?, `isrc`=?, `music_count`=?, `remark`=?, `contract_no`=?, `price`=?, `discount_price`=?, `is_blur`=?, `is_separate_buy`=?, `is_vip_buy`=?, `record_coid`=?, `distributor_coid`=?, `copyright_coid`=?, `copyright_percent`=?, `song_coid`=?, `song_percent`=?, `lyric_coid`=?, `lyric_percent`=?, `mv_coid`=?, `start_time`=?, `end_time`=?, `exclusive_start_time`=?, `exclusive_end_time`=?, `auto_delay`=?, `behavior_limit`=?, `behavior_reason`=?, `type`=?, `pay`=?, `task`=?, `music_task`=?, `is_publish`=?, `source`=?, `addtime`=?, `edittime`=?, `editor`=?, `out_songlist_id`=?, `is_comfirm`=?, `is_special`=?, `region`=?, `pack_id`=?, `appid_block`=?, `qq_track_id`=?, `old_cpy`=?, `out_import_id`=?
                                where
                                        ((`cid` = ?))
                ; args=[42529166 Michael Eversden Below The Star-Stretched Sky Out of Bounds 0 0  0 180724腾讯同步_180724腾讯同步  0 0 1 0 0 0 0 313104 100 0 100 0 100 0 0000-00-00 0000-00-00 0000-00-00 0000-00-00 0 0  3 0 2 2 1 20 2018-07-24 09:52:11 2018-07-24 18:52:12 腾讯增量更新 0 0 0 1 64  214984698 1 0 42529166]
2018-07-27 09:38:10 ERROR Error 1205: Lock wait timeout exceeded; try restarting transaction
2018-07-27 09:38:10 ERROR Error 1205: Lock wait timeout exceeded; try restarting transaction
2018-07-27 09:38:10 INFO Looking for magic cut-over table
2018-07-27 09:38:10 INFO Dropping magic cut-over table
2018-07-27 09:38:10 INFO Droppping table `copyright`.`_c_copyright_del`
2018-07-27 09:38:10 INFO Table dropped
2018-07-27 09:38:11 INFO Grabbing voluntary lock: gh-ost.4240864468.lock
2018-07-27 09:38:11 INFO Setting LOCK timeout as 6 seconds
2018-07-27 09:38:11 INFO Looking for magic cut-over table
2018-07-27 09:38:11 INFO Creating magic cut-over table `copyright`.`_c_copyright_del`
2018-07-27 09:38:11 INFO Magic cut-over table created
2018-07-27 09:38:11 INFO Locking `copyright`.`c_copyright`, `copyright`.`_c_copyright_del`
[MySQL] 2018/07/27 09:38:12 packets.go:32: unexpected EOF
[MySQL] 2018/07/27 09:38:12 packets.go:118: write tcp 10.1.137.252:54606->10.1.137.252:3306: write: broken pipe
[MySQL] 2018/07/27 09:38:13 packets.go:32: unexpected EOF
[MySQL] 2018/07/27 09:38:13 packets.go:118: write tcp 10.1.137.252:54610->10.1.137.252:3306: write: broken pipe
Copy: 39004552/39004552 100.0%; Applied: 186988; Backlog: 100/100; Time: 23h47m20s(total), 8h47m59s(copy); streamer: binlog.010003:1011979413; State: migrating; ETA: due

As I use the lastest version v1.0.46, the error remain.

@shlomi-noach
Copy link
Contributor

Thank you. It would be very helpful to get some previous log entries, where gh-ost gets into cut-over.

However, I think I recognize this from #377. The flow is not precisely the same, but I think it's the same. Also related: #379. Also somewhat related: #611

@linuxybird
Copy link

I also encountered this problem.
···
Copy: 40535109/40535109 100.0%; Applied: 6767442; Backlog: 0/1000; Time: 31h57m50s(total), 31h39m45s(copy); streamer: binlog.011628:872892634; State: migrating; ETA: due
Copy: 40535109/40535109 100.0%; Applied: 6767442; Backlog: 0/1000; Time: 31h57m55s(total), 31h39m45s(copy); streamer: binlog.011628:873989915; State: migrating; ETA: due
Copy: 40535109/40535109 100.0%; Applied: 6767442; Backlog: 0/1000; Time: 31h58m0s(total), 31h39m45s(copy); streamer: binlog.011628:874982119; State: migrating; ETA: due
Copy: 40535109/40535109 100.0%; Applied: 6767442; Backlog: 0/1000; Time: 31h58m5s(total), 31h39m45s(copy); streamer: binlog.011628:876076892; State: migrating; ETA: due
2018-09-15 18:45:50 ERROR Error 1205: Lock wait timeout exceeded; try restarting transaction
2018-09-15 18:45:50 INFO Looking for magic cut-over table
2018-09-15 18:45:50 ERROR Error 1205: Lock wait timeout exceeded; try restarting transaction
2018-09-15 18:45:50 INFO Dropping magic cut-over table
2018-09-15 18:45:50 INFO Dropping table xxxx._k_xxx_del
2018-09-15 18:45:50 INFO Table dropped
2018-09-15 18:45:51 INFO Grabbing voluntary lock: gh-ost.128772404.lock
2018-09-15 18:45:51 INFO Setting LOCK timeout as 20 seconds
2018-09-15 18:45:51 INFO Looking for magic cut-over table
2018-09-15 18:45:51 INFO Creating magic cut-over table xxx._k_xxx_del
2018-09-15 18:45:51 INFO Magic cut-over table created
2018-09-15 18:45:51 INFO Locking xxxx.k_xxx, xxx._k_xxx_del
···

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants