Page MenuHomePhabricator

Reset geo_tags auto_increment value to 1 in dewiki
Closed, DeclinedPublic

Description

Due to a bug, gt_id is now at 67% of its max value in dewiki. Fixing this would allow us to build an alert that would let us know if a value reaches 50% or more.

Event Timeline

Ladsgroup renamed this task from Reset geo_tags auto_increment value to 1 to Reset geo_tags auto_increment value to 1 in dewiki.Apr 11 2022, 10:40 PM
Ladsgroup created this task.
Ladsgroup updated the task description. (Show Details)

*sigh* InnoDB doesn't allow reset to 1. I tried it on testwiki.

More info: https://stackoverflow.com/questions/8923114/how-to-reset-auto-increment-in-mysql#8923132

Note that you cannot reset the counter to a value less than or equal to any that have already been used. For MyISAM, if the value is less than or equal to the maximum value currently in the AUTO_INCREMENT column, the value is reset to the current maximum plus one. For InnoDB, if the value is less than the current maximum value in the column, no error occurs and the current sequence value is not changed.

One other way to do it is to create a temp table and move it around but that'd be really complicated :/

Marostegui triaged this task as Medium priority.May 23 2022, 1:30 PM
Marostegui moved this task from Triage to In progress on the DBA board.

@Ladsgroup any prediction on when we'd run out of ids?

Here is the thing. It won't run out of value any time soon (probably never) but since it's already pretty high, it'll trigger alerts.

Maybe we can make a way to exclude tables or whitelist them?

yeah but it's dangerous, for example what if the same bug gets re-introduced again and start increasing the value too fast?

Yeah, I see...but the solution is very complex and risky just to keep an alert in green state. I'd rather have the alert in place and then being able to silence this table than having no alert at all :)

Would it be difficult to increase the alert threshold of this value to something like 80% while keeping all other values at the default value?

So I am going to close this as this won't be happening. We can implement a threshold in the future alert.
Please reopen if you feel this needs to be addressed.