Merge "Reduce outages due to master DB problems in doViewUpdates"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Wed, 15 Apr 2015 00:41:05 +0000 (00:41 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Wed, 15 Apr 2015 00:41:05 +0000 (00:41 +0000)
includes/page/WikiPage.php

index 8754fb9..059a3f8 100644 (file)
@@ -1142,7 +1142,12 @@ class WikiPage implements Page, IDBAccessObject {
                }
 
                // Update newtalk / watchlist notification status
-               $user->clearNotification( $this->mTitle, $oldid );
+               try {
+                       $user->clearNotification( $this->mTitle, $oldid );
+               } catch ( DBError $e ) {
+                       // Avoid outage if the master is not reachable
+                       MWExceptionHandler::logException( $e );
+               }
        }
 
        /**