Debug logging and possible fix for bug 31177: mystery sidebar message failures
authorBrion Vibber <brion@users.mediawiki.org>
Tue, 27 Sep 2011 00:41:24 +0000 (00:41 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Tue, 27 Sep 2011 00:41:24 +0000 (00:41 +0000)
commitea44989fe4d1abf1508f9ebe9264c278ffcc3f35
tree53e720acafe2b82439cc466a3c7b026785820671
parentdc4ab75a5119a50f951d8ea72ed95a35a8122661
Debug logging and possible fix for bug 31177: mystery sidebar message failures

This may be related to things failing on load from External Storage; however we have not yet been able to verify this.

Tweaks MessageCache::loadFromDB() and MessageCache::getMsgFromNamespace() to avoid storing empty cache entries when loading text fails.
When building initial cache if we get a failure we'll log and store a '!TOO BIG' message which requests on-demand load later.
If an on-demand load failures, we'll log and return the false through but won't update the cache with the bad value.

To enable the logging in production, set up a $wgDebugLogFiles entry for 'MessageCache'.

Note that MessageCache::loadFromDB() bypasses Revision's text entry memcaching and may cause a lot of ES fetches at once.
However any ES failures *should* already be logged in the 'ExternalStoreDB' log file.
includes/cache/MessageCache.php