pt-online-schema-change does not show progress until completed

Bug #846028 reported by Michael Mior on 2011-09-09
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Toolkit
Daniel Nichter
Daniel Nichter

Bug Description

When running pt-online-schema change, I don't seem to get any progress output until the entire operation is complete, at which point, all the progress messages output at once. This behavior seems to vary depending on what is specified in the --progress option. Specifically, I see this behavior with --progress percent,1 and the default value (no --progress specified)

Related branches

Baron Schwartz (baron-xaprb) wrote :

Unfortunately I can't duplicate this. Can you be more specific? It sounds like it's an issue with something in your environment that's beyond our control, such as STDERR not being flushed.

Michael Mior (michaelmior) wrote :

Haven't experienced similar issues before with other programs. I've successfully used the tool on both my development machine and on one of our production severs with similar issues. (Other than that, everything worked wonderfully, so thanks for that :)

Anyway, for more details, I ran a test with the exact command line of

pt-online-schema-change D=test,t=test --progress time,5

Below is the output. In this particular case, the operation took several minutes. The first progress output of 0% occurred while the job was running, and then 100% when the job was complete.

# 2011-10-13T15:40:45 /usr/bin/pt-online-schema-change started
# 2011-10-13T15:40:45 USE `test`
# 2011-10-13T15:40:45 Alter table test using temporary table __tmp_test
# 2011-10-13T15:40:45 Checking if table test can be altered
# 2011-10-13T15:40:45 SHOW TRIGGERS FROM `test` LIKE 'test'
# 2011-10-13T15:40:46 Table test can be altered
# 2011-10-13T15:40:46 Chunk column id, index PRIMARY
# 2011-10-13T15:40:46 Chunked table test into 125 chunks
# 2011-10-13T15:40:46 Starting online schema change
# 2011-10-13T15:40:46 CREATE TABLE `test`.`__tmp_test` LIKE `justlikeme`.`test`
# 2011-10-13T15:41:19 Shared columns: id, first_name, last_name
# 2011-10-13T15:41:19 Calling OSCCaptureSync::capture()
# 2011-10-13T15:41:19 CREATE TRIGGER mk_osc_del AFTER DELETE ON `test`.`test` FOR EACH ROW DELETE IGNORE FROM `test`.`__tmp_test` WHERE `test`.`__tmp_test`.id =
# 2011-10-13T15:41:19 CREATE TRIGGER mk_osc_upd AFTER UPDATE ON `test`.`test` FOR EACH ROW REPLACE INTO `test`.`__tmp_test` (id, first_name, last_name) VALUES (, NEW.first_name, NEW.last_name)
# 2011-10-13T15:41:19 CREATE TRIGGER mk_osc_ins AFTER INSERT ON `test`.`test` FOR EACH ROW REPLACE INTO `test`.`__tmp_test` (id, first_name, last_name) VALUES(, NEW.first_name, NEW.last_name)
# 2011-10-13T15:41:19 Calling CopyRowsInsertSelect::copy()
Copying rows: 0% 03:45:16 remain
Copying rows: 100% 00:00 remain
# 2011-10-13T15:43:16 Calling OSCCaptureSync::sync()
# 2011-10-13T15:43:16 Renaming tables
# 2011-10-13T15:43:16 RENAME TABLE `test`.`test` TO `test`.`__old_test`, `test`.`__tmp_test` TO `test`.`test`
# 2011-10-13T15:43:28 Original table test renamed to __old_test
# 2011-10-13T15:43:28 Calling CopyRowsInsertSelect::cleanup()
# 2011-10-13T15:43:28 Calling OSCCaptureSync::cleanup()
# 2011-10-13T15:43:28 DROP TRIGGER IF EXISTS `test`.`mk_osc_del`
# 2011-10-13T15:43:28 DROP TRIGGER IF EXISTS `test`.`mk_osc_ins`
# 2011-10-13T15:43:28 DROP TRIGGER IF EXISTS `test`.`mk_osc_upd`
# 2011-10-13T15:43:28 /usr/bin/pt-online-schema-change ended, exit status 0

tags: added: progress pt-online-schema-change
Changed in percona-toolkit:
assignee: nobody → Daniel Nichter (daniel-nichter)
milestone: none → 2.1.1
importance: Undecided → Medium
status: New → Triaged
Daniel Nichter (daniel-nichter) wrote :

This won't be fixed in pt-online-schema-change 2.0 but it is working in 2.1 and everyone should switch to pt-osc 2.1 because it's far superior to 2.0 (and does the exact same thing, but many command line options have changed, etc.)

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers