2 ms·
I was manually monitoring a slow query of mine with "SHOW FULL PROCESSLIST", and at one point I saw "delete from readings" pop up. Readings being a massive, ma
by knodi123 4y ago
I was manually monitoring a slow query of mine with "SHOW FULL PROCESSLIST", and at one point I saw "delete from readings" pop up. Readings being a massive, massive table that drove most of our functionality. I quickly killed the query and went about trying to see who else was connected to the DB, but then I saw the query come up again. So I killed it again, and second later it came back.
I had to shout one of the sales guys over, and tell him to go office to office and demand anybody who was deleting rows to stop. Meanwhile I stayed at my desk and kept killing the query.
Shortly after, I heard our CTO yell "shit!", and the query went away. He was trying to clear out his local testing DB, and didn't realize he was in a production shell. I don't know if I saved the company, but I certainly saved us from a couple of days of downtime and maybe an equal or larger amount of lost data. But the CTO couldn't praise me publicly or he'd look like an idiot, so that was the end of that story!