Page MenuHomePhabricator

Error (Wikimedia\Rdbms\DBQueryError) when creating a SecurePoll poll on testwiki
Closed, ResolvedPublic


I'd try to create test poll on testwiki with these settings:

but got this error: [WS2LGgpAAD0AAcvQbEwAAAAA] 2017-05-30 15:09:15: Неустранимое исключение типа «Wikimedia\Rdbms\DBQueryError»:

Event Timeline

MBH created this task.May 30 2017, 3:16 PM
Restricted Application added subscribers: Base, Aklapper. · View Herald TranscriptMay 30 2017, 3:16 PM
MBH added a comment.EditedMay 30 2017, 3:18 PM

Option "1st poll type" instead of "3rd poll type" gives exactly this error, except for string [WS2M5QpAME8AAGJJzkAAAAAE].

Aklapper renamed this task from Error when creating a SecurePoll poll on testwiki to Error (Wikimedia\Rdbms\DBQueryError) when creating a SecurePoll poll on testwiki.May 30 2017, 4:02 PM
[WS2LGgpAAD0AAcvQbEwAAAAA] /wiki/Special:SecurePoll/create   Wikimedia\Rdbms\DBQueryError from line 1135 of /srv/mediawiki/php-1.30.0-wmf.2/includes/libs/rdbms/database/Database.php: A database query error has occurred. Did you forget to run your application's database schema updater after upgrading? 
Query: INSERT  INTO `securepoll_elections` (el_title,el_ballot,el_tally,el_primary_lang,el_start_date,el_end_date,el_auth_type,el_owner,el_entity) VALUES (<redacted>)
Function: SecurePoll_CreatePage::processInput
Error: 1054 Unknown column 'el_owner' in 'field list' (
matmarex added a subscriber: demon.

It looks like a schema change to add that field was never applied? T158906 claims that it was, though.

matmarex updated the task description. (Show Details)May 30 2017, 4:17 PM

That request never reached DBAs, someone closed it before we could even be aware of it.

demon added a subscriber: Reedy.May 30 2017, 10:24 PM

That request never reached DBAs, someone closed it before we could even be aware of it.

I opened it because it looked like a schema change hadn't been applied, but then talked to @Reedy and looked and thought maybe it was. Hence the quick self-closure. Can easily reopen if that's incorrect.

Mentioned in SAL (#wikimedia-operations) [2017-05-30T22:43:48Z] <Reedy> created securepoll_elections.el_owner on testwiki T166568

el_owner has been around for 8 years, no retrospective patch was added till the bug surfaced above in the train suggests I created it on all wikis, but seemingly missed testwiki? It's certainly there on other wikis, such as enwiki

I have checked all the wikis listed on dblists and the one I have found missing that column and present on the dblists is:

s3: foundationwiki

Is it needed there? I guess it is not really used:

-rw-rw---- 1 mysql mysql 112K Nov 18  2015 securepoll_elections.ibd
Reedy added a comment.May 31 2017, 2:09 PM

Extension is enabled there, for one reason or another

I've run the ALTER TABLE there aswell now, so everything is in sync...

jcrespo assigned this task to MBH.EditedMay 31 2017, 4:13 PM

So according to Reedy, Marostegui and Demon, this seems like a 1 time thing and no further action is needed (sorry I was useless here, but I didn't have enough context).

Kowing that, I would ask original reported @MaxBioHazard to retry and see if it works now, then resolve the ticket or report further problems if needed.

MBH closed this task as Resolved.Jun 3 2017, 1:17 AM

Yes, now it works.

Huji added a subscriber: Huji.Jun 3 2017, 6:18 AM

As post-mortem: el_owner has been there for years but because the code did not actually use it, these kinds of bugs wouldn't surface themselves. Recent changes to the code (by me) resulted in it actually being used as intended, hence if a wiki's DB schema had not been updated, we now would get an error. I am glad that all WMF wikis are now up to date.

mmodell changed the subtype of this task from "Task" to "Production Error".Aug 28 2019, 11:10 PM