Aaron Schulz has uploaded a new change for review.

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

Change subject: Add transaction ticket to LinksUpdateComplete hook
......................................................................

Add transaction ticket to LinksUpdateComplete hook

This lets callers use commitAndWaitForReplication() more easily.

Change-Id: I743bd1f989b8fb3b7ba3e5cc8ce1bb44c00f99af
---
M docs/hooks.txt
M includes/deferred/LinksUpdate.php
2 files changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/51/312451/1

diff --git a/docs/hooks.txt b/docs/hooks.txt
index ae0770b..2bfeb66 100644
--- a/docs/hooks.txt
+++ b/docs/hooks.txt
@@ -1974,6 +1974,7 @@
 'LinksUpdateComplete': At the end of LinksUpdate::doUpdate() when updating,
 including delete and insert, has completed for all link tables
 &$linksUpdate: the LinksUpdate object
+$ticket: prior result of LBFactory::getEmptyTransactionTicket()
 
 'LinksUpdateConstructed': At the end of LinksUpdate() is construction.
 &$linksUpdate: the LinksUpdate object
diff --git a/includes/deferred/LinksUpdate.php 
b/includes/deferred/LinksUpdate.php
index d18349b..8954304 100644
--- a/includes/deferred/LinksUpdate.php
+++ b/includes/deferred/LinksUpdate.php
@@ -176,7 +176,7 @@
                // Run post-commit hooks without DBO_TRX
                $this->getDB()->onTransactionIdle(
                        function () {
-                               Hooks::run( 'LinksUpdateComplete', [ &$this ] );
+                               Hooks::run( 'LinksUpdateComplete', [ &$this, 
$this->ticket ] );
                        },
                        __METHOD__
                );

-- 
To view, visit https://gerrit.wikimedia.org/r/312451
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I743bd1f989b8fb3b7ba3e5cc8ce1bb44c00f99af
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz <asch...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to