Page MenuHomePhabricator

WinCache increment loses TTL information
Closed, ResolvedPublic


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.

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.

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

Event Timeline

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

@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 Platform Engineering 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.

Krinkle removed a project: Patch-For-Review.