Page MenuHomeMiraheze

Lack of PK on RottenLinks tables causes huge replication lag
Closed, ResolvedPublic

Description

https://grafana.miraheze.org/d/_9zrwMHmk/mariadb-replication?viewPanel=16&orgId=1&var-interval=$__auto_interval_interval&var-host=db7.miraheze.org:9104&from=1598277635054&to=1598309632462

db7 log: 2020-08-24 17:00:29 108 [Note] The slave is applying a ROW event on behalf of a DELETE statement on table rottenlinks and is currently taking a considerable amount of time (61 seconds). This is due to the fact that it is scanning the table while looking up records to be processed. Consider adding a primary key (or unique key) to the table to improve performance.

db7 replica state: Slave_SQL_Running_State: Delete_rows_log_event::find_row(-1)

A PK was added in https://github.com/miraheze/RottenLinks/pull/18, but reverted https://github.com/miraheze/RottenLinks/pull/21. What's the reason? @Paladox

Event Timeline

Southparkfan triaged this task as High priority.Mon, Aug 24, 22:55
Southparkfan created this task.
Paladox added a comment.Tue, Aug 25, 01:35

The sql failed to update with some error I forgot.

John moved this task from Backlog to Feedback on the RottenLinks board.Tue, Sep 8, 17:49
John closed this task as Resolved.Tue, Sep 8, 17:57
John claimed this task.