percona-toolkit icon indicating copy to clipboard operation
percona-toolkit copied to clipboard

die on DBI error such as a failure to update heartbeat table

Open joemiller opened this issue 10 years ago • 2 comments

If you are running pt-heartbeat in daemon mode with --update and the heartbeat table is removed (eg: mistakenly by an admin, or other) then pt-heartbeat will continuously spin with an error such as:

Nov 13 01:06:02 hostname [email protected][9519]: Table 'database._pt_heartbeat' doesn't exist [for Statement "UPDATE `pantheon`.`_pt_heartbeat` SET ts=?, file=?, position=?, relay_master_log_file=?, exec_master_log_pos=? WHERE server_id='2272608305'" with ParamValues: 0='2015-11-13T01:06:02.001110', 1='mysql-bin.000005', 2='366399508', 3=undef, 4=undef]

Instead, we would prefer that it exit()'d with error which would allow for the supervisor to restart the process which would re-create the table if the create-table option was specified.

joemiller avatar Nov 18 '15 22:11 joemiller

+1

Hornswoggles avatar Jan 19 '16 21:01 Hornswoggles

CLA assistant check
All committers have signed the CLA.

it-percona avatar May 15 '20 18:05 it-percona

You can have the same behavior if you use the option --fail-successive-errors.

svetasmirnova avatar Sep 14 '22 23:09 svetasmirnova