Page MenuHomePhabricator

abstractwiki_run_fragment runs the fragment twice when called synchronously
Open, In Progress, Needs TriagePublicBUG REPORT

Description

Description

When ApiAbstractWikiRunFragment is called with $async=false and the fragment is not cached, it runs the fragment twice:

  • AWFragmentStore::get will asynchronously re-render the fragment (via job) if there's a miss
  • But because $async=false, the api will synchronously render it, too.

This causes two calls for every missed fragment which, because one goes through jobs, and the other is a synchronous call, might even be hitting the orchestrator at the exact same time.


Completion checklist

Event Timeline

Change #1321622 had a related patch set uploaded (by Genoveva Galarza; author: Genoveva Galarza):

[mediawiki/extensions/WikiLambda@master] Add revalidate flag to AWFragmentStore getter

https://gerrit.wikimedia.org/r/1321622

gengh changed the task status from Open to In Progress.Thu, Aug 6, 8:18 AM

Change #1321622 merged by jenkins-bot:

[mediawiki/extensions/WikiLambda@master] Add revalidate flag to AWFragmentStore getter

https://gerrit.wikimedia.org/r/1321622