Page MenuHomePhabricator

Make RESTBagOStuff::add() atomic
Open, NormalPublic



It currently does a get() then a set(), which has some race issues.

per @aaron. I think the Session Storage API doesn't support atomic adds, but I'd like to capture it here.

Event Timeline

Is this about MediaWiki-Cache, or which part of the codebase? Adding codebase project tags is very welcome.

@aaron asked me to create tickets for all the TODO comments in RESTBagOStuff. This is one of those tickets.

This is the class that we're using for session storage.

Per T222908 I think we've determined that set-if-not-exists behaviour isn't important for session storage. The Kask server doesn't support SETNX.

If we ever want to use Kask or the RESTBagOStuff for other storage, this might be an issue. Right now, for session storage, it's not. So I'm going to un-tag this from the session management service.

Eevans triaged this task as Normal priority.Jul 10 2019, 6:52 PM
Eevans moved this task from Inbox to Icebox on the Core Platform Team board.