From f96bc2eb6f272e0fb1e5261a8536ba8477227e03 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Mon, 13 Apr 2015 16:50:34 -0700 Subject: [PATCH] Reduce outages due to master DB problems in doViewUpdates Change-Id: Ie28e8dcfc3bc402b3119d9cf43612acab2af1004 --- includes/page/WikiPage.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/includes/page/WikiPage.php b/includes/page/WikiPage.php index 6242a548a8..37a01d4893 100644 --- a/includes/page/WikiPage.php +++ b/includes/page/WikiPage.php @@ -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 ); + } } /** -- 2.20.1