pt-online-schema-change doesn't clean up triggers when receiving SIGINT

Bug #1077218 reported by rcoli
18
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Percona Toolkit moved to https://jira.percona.com/projects/PT
Triaged
Undecided
Unassigned

Bug Description

repro steps :

1) start ALTER with pt-osc
2) hit ctrl-c to abort, possibly because the trigger is exhausting thread_stack
3) notice that while the signal is handled ("Exiting on SIGINT."), the code which either removes the triggers or notifies the user that the triggers have not been dropped (with the SQL to drop them) does not run
4) be confused as to why your thread_stack is still exhausted, until you manually drop the triggers

While I understand part of the point of not deleting the triggers is the resume feature, if I ctrl-c out of pt-osc, I personally would prefer the triggers be deleted. At very least, I'd like the code which would warn me that they have not been deleted to run. :)

tags: added: pt-online-schema-change triggers
Changed in percona-toolkit:
status: New → Confirmed
Brian Fraser (fraserbn)
Changed in percona-toolkit:
assignee: nobody → Brian Fraser (fraserbn)
Revision history for this message
Brian Fraser (fraserbn) wrote :

Hi,

I can't reproduce this; Hitting Ctrl + C seems to always trigger the message that the triggers & new table won't be dropped. Have you tried with the newest version of the toolkit? If so, could you send the output of running the tool with PTDEBUG?

Changed in percona-toolkit:
status: Confirmed → Incomplete
Revision history for this message
rcoli (rcoli) wrote :

I'm using 2.1.4, will try with 2.1.7 ASAP.

Revision history for this message
rcoli (rcoli) wrote :

Tried with 2.1.9, ctrl-c resulted in no messages and neither the triggers nor the table being dropped. Had to manually clean them up.

Potentially relevant information :

Ubuntu 10.04 (Lucid Lynx)
This is perl, v5.10.1 (*) built for x86_64-linux-gnu-thread-multi

Changed in percona-toolkit:
assignee: Brian Fraser (fraserbn) → nobody
status: Incomplete → Triaged
Changed in percona-toolkit:
milestone: none → 2.2.6
importance: Undecided → Medium
Changed in percona-toolkit:
importance: Medium → Undecided
milestone: 2.2.6 → none
Revision history for this message
Rares Mirica (mrares) wrote :

Would be very happy to have a flag instructing osc to drop the triggers and new table if ctrl+c is pressed, so that no extra manual work is needed.

Revision history for this message
rcoli (rcoli) wrote :

@Rares Mirica :

Are you saying that you can reproduce the behavior I have, where ctrl-c does not clean up? If so, what versions of pt-osc and perl are you using?

Revision history for this message
Rares Mirica (mrares) wrote :

@rcoli

I believe the standard behaviour is to display a message with the necessary SQL that needs to run for the cleanup (DROP TRIGGERS, DROP DATABASE). I see potential for improvement (removal of necessary manual intervention) by providing a flag to trigger dropping triggers and databases upon ctrl+c.

But I do see the message, so it works as advertised....

Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PT-1045

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

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.