Page MenuHomePhabricator

Special:Notifications displays SQL error when database is read-only
Closed, ResolvedPublic

Description

URL displayed this just now:

A database query syntax error has occurred. This may indicate a bug in the software. The last attempted database query was:

(SQL query hidden)

from within function "EchoNotificationController::markRead". Database returned error "1290: The MySQL server is running with the --read-only option so it cannot execute this statement (10.64.16.8)".

The edit page[1] was apparently up to speed with the database being read-only. It displays:

Warning: The database has been locked for maintenance, so you will not be able to save your edits right now. You may wish to cut-n-paste the text into a text file and save it for later.

[1] https://www.mediawiki.org/wiki/User:Siebrand?action=edit&uselang=en

Expected behaviour:

  • No write actions should be allowed while database is in read-only mode.

Version: master
Severity: normal
URL: https://www.mediawiki.org/wiki/Special:Notifications?uselang=en

Details

Reference
bz44247

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 1:33 AM
bzimport added a project: Notifications.
bzimport set Reference to bz44247.

What are we supposed to do in this situation? Just silently not mark notifications as read?

(In reply to comment #1)

What are we supposed to do in this situation? Just silently not mark
notifications as read?

That seems to be the only possible course of action. Displaying and not marking as read is much better than not displaying and throwing a SQL error :).

bsitu wrote:

It sounds to me this is something that should be handled in core. Errors resulting from read-only mode should receive special treatment and there should be a system-wide notice about database being locked for maintenance

Related URL: https://gerrit.wikimedia.org/r/62922 (Gerrit Change I2e41cef0b5952c43cbba3374ac4da431b81c18ba)

https://gerrit.wikimedia.org/r/62922 (Gerrit Change I2e41cef0b5952c43cbba3374ac4da431b81c18ba) | change APPROVED and MERGED [by jenkins-bot]

  NODES
Note 1
Project 1