Page MenuHomePhabricator

WinCache increment loses TTL information
Closed, ResolvedPublic

Description

Symptoms
When incrementing the value of a key, using $cache->incr($key);, the key is reset with an infinite Time To Live (0 in WinCache). This violates the expectation that the increment function preserves TTL.

Results
Throttling is broken because the throttle keys do not expire when they should. As a user performs more actions, they begin accumulating indefinitely, so the user is throttled until the WinCache is manually cleared.

Fix
Reimplement the increment function for WinCache, taking into account the right TTL.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptDec 13 2018, 7:12 PM

Change 479513 had a related patch set uploaded (by Juan Osorio (Microsoft); owner: Juan Osorio (Microsoft)):
[mediawiki/core@master] Fixes WinCache increment losing TTL.

https://gerrit.wikimedia.org/r/479513

osorio-juan-microsoft triaged this task as Normal priority.Jan 22 2019, 5:58 PM

@Krinkle Do you think you could help me take a look at this one?

@osorio-juan-microsoft Thanks for patching this. That looks like a pretty bad problem indeed. Sorry about that.

I have made changes to this class as part of wider maintenance work, but unfortunately don't have any knowledge about WinCache, nor am I presently able to verify or test this.

I've tagged Core Platform Team who might want to take a look at this first.

Change 479513 merged by jenkins-bot:
[mediawiki/core@master] objectcache: Fixes WinCache increment losing TTL.

https://gerrit.wikimedia.org/r/479513

Krinkle closed this task as Resolved.Feb 6 2019, 2:45 AM
Krinkle removed a project: Patch-For-Review.