Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Force update on template refresh, refs 2365 #2767

Merged
merged 1 commit into from Oct 14, 2017

Conversation

Projects
None yet
2 participants
@mwjames
Copy link
Contributor

mwjames commented Oct 14, 2017

This PR is made in reference to: #2365

This PR addresses or contains:

  • If we somehow detect a template update is ongoing through the means of a refreshLinks job force an update even though the revision hasn't changed (and hereby the update marker).

This PR includes:

  • Tests (unit/integration)
  • CI build passed

@mwjames mwjames merged commit b851c1a into master Oct 14, 2017

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@mwjames mwjames deleted the template-upd branch Oct 14, 2017

mwjames added a commit that referenced this pull request Oct 14, 2017

@mwjames

This comment has been minimized.

Copy link
Contributor Author

mwjames commented Oct 14, 2017

Back-ported to 2.5.x with 848ed0c.

@mwjames

This comment has been minimized.

Copy link
Contributor Author

mwjames commented Oct 14, 2017

@kghbln FYI

@kghbln kghbln added this to the SMW 2.5.5 milestone Oct 14, 2017

@mwjames

This comment has been minimized.

Copy link
Contributor Author

mwjames commented Oct 14, 2017

A bit of a backstory:

  • When content is altered (and hereby most likely relevant data for SMW) the SMW update process is run as part of the LinksUpdate event (aka hook)
  • Since MW 1.28 (or 1.29) the hook is run asynchronously which means it can be scheduled as EnqueueableDataUpdate and run as job
  • To avoid us running twice for the same revision we set an update marker #2365 and store it for an hour so the likelihood us running twice on the same revision within a short period of time is marginal slim (remember new content = new revision = new update)
  • When a template change happens in rapid succession and/or with page still holding an update marker our general strategy is to suppress an update where the revision is known
  • The only way to find out that pages require an update on a template refresh is by looking at $linksUpdate->mTemplates !== [] && $linksUpdate->mRecursive === false and in case the condition matches OPT_FORCED_UPDATE is set so that we skip our check on the update marker
@kghbln

This comment has been minimized.

Copy link
Member

kghbln commented Oct 14, 2017

When a template change happens in rapid succession and/or with page still holding an update marker our general strategy is to suppress an update where the revision is known

Indeed, templates a usually edited frantically so this will reduce the number of jobs. Cool!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.