Page MenuHomePhabricator

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

Description

I'd try to create test poll on testwiki with these settings: http://i.imgur.com/nUyk0KS.png

nUyk0KS.png (951×1 px, 70 KB)

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

K5Y8aDe.png (286×1 px, 119 KB)

Event Timeline

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' (10.64.0.205)
matmarex added a subscriber: demon.

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

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

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

https://github.com/wikimedia/mediawiki-extensions-SecurePoll/commit/2365542cb92b232ba634aa5d8a12362a7039dcbb

https://phabricator.wikimedia.org/T152721#2858335 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

Extension is enabled there, for one reason or another

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

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.

Yes, now it works.

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