Getting this error intermittently while running migration
Open
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 737
- Forks
- 52
- Avg merge
- 4d 4h
- Merged PRs (30d)
- 1
Description
Tried a simple migration, got the below error.

Runner logs:
I0305 06:57:00.697588 00015 migration.go:350] mig_id=1: Running query 'SELECT DATA_LENGTH, INDEX_LENGTH, TABLE_ROWS FROM information_schema.tables WHERE table_schema=? AND table_name=?' (args: [world sbtest1]).
I0305 06:57:00.747675 00015 migration.go:357] mig_id=1: Query response was 'map[DATA_LENGTH:[22593536] INDEX_LENGTH:[2637824] TABLE_ROWS:[98712]]'
E0305 06:57:02.613776 00015 runner.go:363] mig_id=1: RestError [NextStep]: invalid character '<' looking for beginning of value.
I0305 06:57:03.552564 00015 runner.go:373] mig_id=1: Successfully failed migration.
I0305 06:57:13.576634 00015 runner.go:240] Getting staged migrations.
I0305 06:57:13.661886 00015 runner.go:247] No new staged migrations.
pt-osc logs:
[2020-03-05 06:56:58] stdout: Operation, tries, wait:
[2020-03-05 06:56:59] stdout: analyze_table, 10, 1
[2020-03-05 06:56:59] stdout: copy_rows, 10, 0.25
[2020-03-05 06:56:59] stdout: create_triggers, 10, 1
[2020-03-05 06:56:59] stdout: drop_triggers, 10, 1
[2020-03-05 06:56:59] stdout: swap_tables, 10, 1
[2020-03-05 06:56:59] stdout: update_foreign_keys, 10, 1
[2020-03-05 06:56:59] stdout: Starting a dry run. `world`.`sbtest1` will not be altered. Specify --execute instead of --dry-run to alter the table.
[2020-03-05 06:56:59] stdout: Creating new table...
[2020-03-05 06:56:59] stdout: Created new table world._sbtest1_new OK.
[2020-03-05 06:56:59] stdout: Altering new table...
[2020-03-05 06:56:59] stdout: Altered `world`.`_sbtest1_new` OK.
[2020-03-05 06:56:59] stdout: Not creating triggers because this is a dry run.
[2020-03-05 06:56:59] stdout: Not copying rows because this is a dry run.
[2020-03-05 06:56:59] stdout: Not swapping tables because this is a dry run.
[2020-03-05 06:56:59] stdout: Not dropping old table because this is a dry run.
[2020-03-05 06:56:59] stdout: Not dropping triggers because this is a dry run.
[2020-03-05 06:56:59] stdout: 2020-03-05T06:56:59 Dropping new table...
[2020-03-05 06:56:59] stdout: 2020-03-05T06:56:59 Dropped new table OK.
[2020-03-05 06:56:59] stdout: Dry run complete. `world`.`sbtest1` was not altered.
If possible please share your skype id / slack details so that we exchange the logs instead of creating the issues here.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the migration.go:350 and runner.go:363 log locations and the reported pt-osc dry-run output. Reproduce the simple MySQL migration, then trace the response beginning with '<' to determine why the intermittent error occurs. Done means the cause is verified and the failure is fixed or the report is narrowed to an actionable case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- mysql, ruby
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100