Reduce outages due to master DB problems in doViewUpdates
authorAaron Schulz <aschulz@wikimedia.org>
Mon, 13 Apr 2015 23:50:34 +0000 (16:50 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Tue, 14 Apr 2015 17:19:50 +0000 (17:19 +0000)
Change-Id: Ie28e8dcfc3bc402b3119d9cf43612acab2af1004

includes/page/WikiPage.php

index 6242a54..37a01d4 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 );
+               }
        }
 
        /**