X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fdeferred%2FLinksDeletionUpdate.php;h=0743dbec2fc353b6766b660cc71930202bc6dd65;hb=06825cbeaeed8fdee45260bf268d2e4744fbb2e1;hp=f370e43ffdaffe46ebfc35220b80512390565be7;hpb=2b9391c966ed6ae8780153c25e684a3cb44ee46a;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/deferred/LinksDeletionUpdate.php b/includes/deferred/LinksDeletionUpdate.php index f370e43ffd..0743dbec2f 100644 --- a/includes/deferred/LinksDeletionUpdate.php +++ b/includes/deferred/LinksDeletionUpdate.php @@ -71,6 +71,9 @@ class LinksDeletionUpdate extends DataUpdate implements EnqueueableDataUpdate { // Make sure all links update threads see the changes of each other. // This handles the case when updates have to batched into several COMMITs. $scopedLock = LinksUpdate::acquirePageLock( $this->getDB(), $id ); + if ( !$scopedLock ) { + throw new RuntimeException( "Could not acquire lock for page ID '{$id}'." ); + } } $title = $this->page->getTitle(); @@ -222,7 +225,7 @@ class LinksDeletionUpdate extends DataUpdate implements EnqueueableDataUpdate { public function getAsJobSpecification() { return [ - 'wiki' => WikiMap::getWikiIdFromDomain( $this->getDB()->getDomainID() ), + 'wiki' => WikiMap::getWikiIdFromDbDomain( $this->getDB()->getDomainID() ), 'job' => new JobSpecification( 'deleteLinks', [ 'pageId' => $this->pageId, 'timestamp' => $this->timestamp ],