Page MenuHomePhabricator

Exception when the page contains some categories
Open, MediumPublic

Description

On a MediaWiki 1.30.0 with DeletePagesForGood 8940320, I have the following exception when I try to permanently delete a page, specifically a file but it seems the real issue is the category declared in the page (the category of its associated licence).

When I try to first delete the content of the page and then permanently delete the page, it works.

The following log comes from a file capturing the 'exception' channel (the wiki has wgMWLoggerDefaultSpi configured with Monolog).

[2018-12-12 12:07:39] exception.ERROR: [c322c6d9d8c2476db0f50fc3] /index.php?title=Fichier:xxxxxxxxx.jpg&action=delete_page_permanently   Wikimedia\Rdbms\DBUnexpectedError from line 3462 of /xxxxxxxxx/mediawiki/includes/libs/rdbms/database/Database.php: Category::refreshCounts: Cannot flush pre-lock snapshot because writes are pending (ActionDeletePagePermanently::deletePermanently, ActionDeletePagePermanently::deletePermanently, ActionDeletePagePermanently::deletePermanently, ActionDeletePagePermanently::deletePermanently, ActionDeletePagePermanently::deletePermanently, ActionDeletePagePermanently::deletePermanently, ActionDeletePagePermanently::deletePermanently, ActionDeletePagePermanently::deletePermanently, ActionDeletePagePermanently::deletePermanently, ActionDeletePagePermanently::deletePermanently, ActionDeletePagePermanently::deletePermanently, ActionDeletePagePermanently::deletePermanently, ActionDeletePagePermanently::deletePermanently, ActionDeletePagePermanently::deletePermanently, ActionDeletePagePermanently::deletePermanently, ActionDeletePagePermanently::deletePermanently, ActionDeletePagePermanently::deletePermanently, ActionDeletePagePermanently::deletePermanently, ActionDeletePagePermanently::deletePermanently). {"exception":"[object] (Wikimedia\\Rdbms\\DBUnexpectedError(code: 0): Category::refreshCounts: Cannot flush pre-lock snapshot because writes are pending (ActionDeletePagePermanently::deletePermanently, ActionDeletePagePermanently::deletePermanently, ActionDeletePagePermanently::deletePermanently, ActionDeletePagePermanently::deletePermanently, ActionDeletePagePermanently::deletePermanently, ActionDeletePagePermanently::deletePermanently, ActionDeletePagePermanently::deletePermanently, ActionDeletePagePermanently::deletePermanently, ActionDeletePagePermanently::deletePermanently, ActionDeletePagePermanently::deletePermanently, ActionDeletePagePermanently::deletePermanently, ActionDeletePagePermanently::deletePermanently, ActionDeletePagePermanently::deletePermanently, ActionDeletePagePermanently::deletePermanently, ActionDeletePagePermanently::deletePermanently, ActionDeletePagePermanently::deletePermanently, ActionDeletePagePermanently::deletePermanently, ActionDeletePagePermanently::deletePermanently, ActionDeletePagePermanently::deletePermanently). at /xxxxxxxxx/mediawiki/includes/libs/rdbms/database/Database.php:3462)","exception_id":"c322c6d9d8c2476db0f50fc3","exception_url":"/index.php?title=Fichier:xxxxxxxxx.jpg&action=delete_page_permanently","caught_by":"mwe_handler"} {"url":"/index.php?title=Fichier:xxxxxxxxx.jpg&action=delete_page_permanently","ip":"xxxxxxxxx","http_method":"POST","server":"xxxxxxxxx","referrer":"http://xxxxxxxxx/index.php?title=Fichier:xxxxxxxxx.jpg&action=delete_page_permanently","uid":"68c9c86","process_id":10300,"host":"xxxxxxxxx","wiki":"xxxxxxxxx","mwversion":"1.30.0","reqId":"c322c6d9d8c2476db0f50fc3"}