Index: branches/REL1_18/phase3/includes/cache/MessageCache.php |
— | — | @@ -401,7 +401,16 @@ |
402 | 402 | ); |
403 | 403 | |
404 | 404 | foreach ( $res as $row ) { |
405 | | - $cache[$row->page_title] = ' ' . Revision::getRevisionText( $row ); |
| 405 | + $text = Revision::getRevisionText( $row ); |
| 406 | + if( $text === false ) { |
| 407 | + // Failed to fetch data; possible ES errors? |
| 408 | + // Store a marker to fetch on-demand as a workaround... |
| 409 | + $entry = '!TOO BIG'; |
| 410 | + wfDebugLog( 'MessageCache', __METHOD__ . ": failed to load message page text for {$row->page_title} ($code)" ); |
| 411 | + } else { |
| 412 | + $entry = ' ' . $text; |
| 413 | + } |
| 414 | + $cache[$row->page_title] = $entry; |
406 | 415 | } |
407 | 416 | |
408 | 417 | $cache['VERSION'] = MSG_CACHE_VERSION; |
— | — | @@ -683,8 +692,13 @@ |
684 | 693 | $revision = Revision::newFromTitle( Title::makeTitle( NS_MEDIAWIKI, $title ) ); |
685 | 694 | if ( $revision ) { |
686 | 695 | $message = $revision->getText(); |
687 | | - $this->mCache[$code][$title] = ' ' . $message; |
688 | | - $this->mMemc->set( $titleKey, ' ' . $message, $this->mExpiry ); |
| 696 | + if ($message === false) { |
| 697 | + // A possibly temporary loading failure. |
| 698 | + wfDebugLog( 'MessageCache', __METHOD__ . ": failed to load message page text for {$title->getDbKey()} ($code)" ); |
| 699 | + } else { |
| 700 | + $this->mCache[$code][$title] = ' ' . $message; |
| 701 | + $this->mMemc->set( $titleKey, ' ' . $message, $this->mExpiry ); |
| 702 | + } |
689 | 703 | } else { |
690 | 704 | $this->mCache[$code][$title] = '!NONEXISTENT'; |
691 | 705 | $this->mMemc->set( $titleKey, '!NONEXISTENT', $this->mExpiry ); |