Skip to content

Change badrevid retry logic: retry on recent events

Ottomata requested to merge T347884-retry-badrevid-on-recent into main

In !62 (merged), we added logic to use the MW API maxlag param to handle retries. In hindsight, this doesn't quite help us.

  • maxlag param will fail and return the lag of the maximum MariaDB replica, not the one we are currently getting a response from.

  • If we are backfilling older events, replica lag likely doesn't matter much.

Instead, we should retry on badrevids only if the event time of the revision is too recent. This should give any replica some time to replicate e.g. a revision save and respond.

If the event time is old, then a badrevid response is unlikely to change, so there is no need to retry it.

Bug: T347884 Bug: T309699

Merge request reports