Page MenuHomePhabricator

Log spam: "MediaWiki\Parser\ParserObserver::notifyParse: Possibly redundant parse!" from DiscussionTools code
Open, Needs TriagePublic

Description

I've noticed these warnings when browsing DiscussionTools-related error logs: "MediaWiki\Parser\ParserObserver::notifyParse: Possibly redundant parse!": https://logstash.wikimedia.org/goto/50a9d4994fda89548ad47313a4da762d

image.png (467×2 px, 66 KB)

At ~5k occurrences per day, they represent a very small part of "Possibly redundant parse" logs related to T292300 (3M/day), but a large part of logs related to DiscussionTools (10k/day, if you don't count those for T323065), so they're pretty annoying for me.

Event Timeline

From just reading the code a little, it seems to me that the logging occurs because after saving the page, MediaWiki core parses it using ParserOptions for the current user, while we parse it using the canonical ParserOptions for logged-out users. Even when the both sets of options are the same, the parse is not re-used.

If this is correct (I might have misunderstood how things work), then either the parse should be re-used (if that's actually valid), or we shouldn't be logging warnings about it (if it can't be avoided).

(Previously: T303596. I am pretty sure this issue is unrelated.)

@daniel @aaron Can you check whether this is expected? From my own memory, I thought we don't trigger these by default on simple wikitext edits in core even though core has the same usecase as DT here in regards to parsing with canonical options for links update but parsing with user-specific options to prime cache for post-redirect-get pageview. So there must be something differnet here that is causing the warning.

MSantos subscribed.