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

Improve UpdateJob #152

Closed
mwjames opened this issue Feb 4, 2014 · 0 comments
Closed

Improve UpdateJob #152

mwjames opened this issue Feb 4, 2014 · 0 comments
Labels

Comments

@mwjames
Copy link
Contributor

mwjames commented Feb 4, 2014

Store update

Currently UpdateJob calls updateStore explicitly.

$parserData = $this->withContext()->getDependencyBuilder()->newObject( 'ParserData', array(
    'Title'        => $this->getTitle(),
    'ParserOutput' => $parserOutput
) );

$parserData->disableUpdateJobs()->updateStore();

Instead use LinksUpdate which runs updateStore() but additionally does an incremental update on pagelinks, imagelinks, externallinks, and templatelinks tables.

$linksUpdate = new \LinksUpdate( $this->getTitle(), $parserOutput, false );
$linksUpdate->doUpdate();

This would increase update accuracy and would allow to resolve Bug 20352 (currently Special:WhatLinksHere isn't updated which shows outdated links to pages no longer reside in a query or for deleted subjects).

When the LinksUpdatecall is invoked the LinksUpdateConstructed hook is executed.

Duplicates

It needs to be tested if setting $this->removeDuplicates = true reduces possible duplicates for the same Title object.

Reference

https://github.com/SemanticMediaWiki/SemanticMediaWiki/blob/master/tests/phpunit/integration/MwLinksUpdateWithSQLStoreDBIntegrationTest.php

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant