Page MenuHomePhabricator

Make RESTBagOStuff::add() atomic
Open, MediumPublic



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-libs-BagOStuff, 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 Medium priority.Jul 10 2019, 6:52 PM
Eevans moved this task from Inbox to Icebox on the Platform Engineering board.

Removing myself as assignee because I am not currently working on this, and am not scheduled to in the near future. I would not object to working on it on the future if plans and priorities allow, but I do not want to give a false impression of status or discourage anyone else from taking it over.