PTDEBUG only honored at start of utility (pt-online-schema-change)

Description

PTDEBUB is only evaluated by pt-online-schema-change at the beginning of execution.  For a 55G alter, debug generated 643M of debug log.  It was useful to determine an issue with pt-osc but once the issue was discovered, and the utility had run for over an hour, it would be useful to turn debug off.  However, toggling the setting of PTDEBUG has no affect once the utility is running.  

Utilities that utilized PTDEBUG should check the environment setting periodically to see if the value has changed and act accordingly so that debug can be enabled or disabled while the utility run. 

Environment

None

AFFECTED CS IDs

CS0012489

Smart Checklist

Activity

Show:

Sveta Smirnova October 8, 2020 at 11:31 AM

Note, that no tool can utilize environment variable change while it is running, because this change happens in the new context. What can be done instead is to have more complicated debug facility which will watch for an empty file which existence will either enable or disable debugging. Similar to how option sentinel works for the pt-kill command: https://www.percona.com/doc/percona-toolkit/LATEST/pt-kill.html#cmdoption-pt-kill-sentinel

Lalit Choudhary October 2, 2020 at 11:27 AM

Hi John,

Thank you for the FR.

 

Details

Assignee

Reporter

Priority

Affects versions

Smart Checklist

Created September 21, 2020 at 12:13 PM
Updated May 17, 2024 at 3:07 PM