Aaron Schulz has uploaded a new change for review.
https://gerrit.wikimedia.org/r/59379
Change subject: Some tweaks to the database commit callback docs.
......................................................................
Some tweaks to the database commit callback docs.
Change-Id: Ifc1687f5393046d000a49aa7850c6454d03154b8
---
M includes/db/Database.php
1 file changed, 4 insertions(+), 2 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/79/59379/1
diff --git a/includes/db/Database.php b/includes/db/Database.php
index f4d194d..87d5f81 100644
--- a/includes/db/Database.php
+++ b/includes/db/Database.php
@@ -2968,7 +2968,9 @@
* If there is a transaction and it is rolled back, then the callback
is cancelled.
* Callbacks must commit any transactions that they begin.
*
- * This is useful for updates to different systems or separate
transactions are needed.
+ * This is useful for updates to different systems or when separate
transactions are needed.
+ * For example, one might want to enqueue jobs into a system outside
the database, but only
+ * after the database is updated so that the jobs will see the data
when they actually run.
* It can also be used for updates that easily cause deadlocks if locks
are held too long.
*
* @param Closure $callback
@@ -2987,7 +2989,7 @@
* Callbacks must not start nor commit any transactions.
*
* This is useful for updates that easily cause deadlocks if locks are
held too long
- * but where atomicity is strongly desired for these and some related
updates.
+ * but where atomicity is strongly desired for these updates and some
related updates.
*
* @param Closure $callback
* @since 1.22
--
To view, visit https://gerrit.wikimedia.org/r/59379
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifc1687f5393046d000a49aa7850c6454d03154b8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits