Need a way (automatically too?) to purge expired throttles
Description
Description
Details
Details
Subject | Repo | Branch | Lines +/- | |
---|---|---|---|---|
Purge all expired Throttles when running pingLimiter | mediawiki/extensions/ThrottleOverride | master | +14 -7 |
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Open | None | T202759 Ease the bottleneck in wiki account creation at in-person events | |||
Open | None | T27000 Deploy ThrottleOverride extension to Wikimedia wikis | |||
Resolved | bd808 | T147363 Purge expired throttles |
Event Timeline
Comment Actions
Maybe as trivially implemented as a differed or job that is posted after a throttle is checked?
Comment Actions
Current implementation just deletes that override IF it's no longer valid
$conds = [ "thr_range_start <= $quotedIp", "thr_range_end >= $quotedIp", 'thr_type' . $dbr->buildLike( $dbr->anyString(), $action, $dbr->anyString() ) ]; elseif ( $expiry !== false ) { // Expired exemption. Delete it from the DB. wfGetDB( DB_MASTER )->delete( 'throttle_override', $conds, __METHOD__ ); }
Comment Actions
Change 326454 had a related patch set uploaded (by Reedy):
Purge all expired Throttles when running pingLimiter
Comment Actions
Change 326454 abandoned by Reedy:
Purge all expired Throttles when running pingLimiter
Comment Actions
I just noticed in the List too...
if ( !wfReadOnly() && !mt_rand( 0, 10 ) ) { // Purge expired entries on one in every 10 queries $dbw = wfGetDB( DB_MASTER ); $method = __METHOD__; $dbw->onTransactionIdle( function() use ( $dbw, $method ) { $dbw->delete( 'throttle_override', [ $dbw->addIdentifierQuotes( 'thr_expiry' ) . ' < ' . $dbw->addQuotes( $dbw->timestamp() ) ], $method ); } ); }
Comment Actions
This was done in https://gerrit.wikimedia.org/r/#/c/392778/, related task is at T181025