Page MenuHomePhabricator

WANObjectCache fails to store the `null` value
Closed, ResolvedPublic

Description

Noticed this in a tightening of PHPUnit strictness that the test case for set('x', null) actually fails. It was passing previously by accident due to loose comparisons tolerating the returned false value as being "similar enough".

The bottom value for object cache is false, but null is generally allowed.

The tests fails when using WANObjectCache wrapping HashBagOStuff, but pass in isolation with just HashBagOStuff.

Event Timeline

Krinkle added a project: Platform Engineering.
Krinkle added a subscriber: aaron.

Tagging CPT as this would is a fairly small bug that makes a good example to use to get familiar with WANCache internals, transferring knowledge, and pair programming.

@WDoranWMF please decide if you would like somebody on the team to participate in this knowledge transfer.

Change 562656 had a related patch set uploaded (by Aaron Schulz; owner: Aaron Schulz):
[mediawiki/core@master] objectcache: fix storage of null values in WANObjectCache

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

Change 562656 merged by jenkins-bot:
[mediawiki/core@master] objectcache: fix storage of null values in WANObjectCache

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