github / github/gh-ost

allow-nullable-unique-key fails

Open
#744 11 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
13.6k
Forks
1.4k
Avg merge
2h 31m
Merged PRs (30d)
4

Description

ghost version: 1.0.48
Mysql: Amazon RDS 4.7
with `allow-nullable-unique-key` I always get this set of errors

```
...
Copy: 0/50256664 0.0%; Applied: 0; Backlog: 0/1000; Time: 0s(total), 0s(copy); streamer: mysql-bin-changelog.023845:7803; State: migrating; ETA: N/A
Copy: 0/0 100.0%; Applied: 0; Backlog: 0/1000; Time: 0s(total), 0s(copy); streamer: mysql-bin-changelog.023845:7803; State: migrating; ETA: due
2019-05-23 15:32:30 INFO executing gh-ost-on-before-cut-over hook: /home/michaelglass/ghost-migrations/hooks/gh-ost-on-before-cut-over.sh
ok
2019-05-23 15:32:30 INFO New table structure follows
CREATE TABLE `_assignments_users_gho` (
`assignment_id` int(11) NOT NULL,
`user_id` int(11) DEFAULT NULL,
UNIQUE KEY `index_assignments_users_on_assignment_id_and_user_id` (`assignment_id`,`user_id`),
KEY `index_assignments_users_on_user_id` (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
[2019/05/23 15:32:30] [info] binlogsyncer.go:164 syncer is closing...
2019-05-23 15:32:30 INFO Closed streamer connection. err=
2019-05-23 15:32:30 INFO Dropping table `noredink`.`_assignments_users_ghc`
[2019/05/23 15:32:30] [error] binlogstreamer.go:77 close sync with err: sync is been closing...
[2019/05/23 15:32:30] [info] binlogsyncer.go:179 syncer is closed
2019-05-23 15:32:30 INFO Table dropped
2019-05-23 15:32:30 INFO Dropping table `noredink`.`_assignments_users_gho`
2019-05-23 15:32:30 INFO Table dropped
2019-05-23 15:32:30 INFO executing gh-ost-on-success hook: /home/michaelglass/ghost-migrations/hooks/gh-ost-on-success-hook.sh
2019-05-23 15:32:30 ERROR Error 1146: Table 'noredink._assignments_users_ghc' doesn't exist
ok
2019-05-23 15:32:30 INFO Done migrating `noredink`.`assignments_users`
2019-05-23 15:32:30 INFO Removing socket file: /tmp/assignments_users.test.sock
2019-05-23 15:32:30 INFO Tearing down inspector
2019-05-23 15:32:30 INFO Tearing down applier
2019-05-23 15:32:30 INFO Tearing down streamer
2019-05-23 15:32:30 INFO Tearing down throttler
```
It seems like Error 1146 is a downstream error from the binstream error.

The problem doesn't exist in the same setup on tables with non-nullable unique keys.

Any ideas?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.