Some tweaks to the database commit callback docs.
authorAaron Schulz <aschulz@wikimedia.org>
Tue, 16 Apr 2013 07:28:45 +0000 (00:28 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Tue, 16 Apr 2013 07:30:30 +0000 (00:30 -0700)
Change-Id: Ifc1687f5393046d000a49aa7850c6454d03154b8

includes/db/Database.php

index f4d194d..87d5f81 100644 (file)
@@ -2968,7 +2968,9 @@ abstract class DatabaseBase implements DatabaseType {
         * 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 @@ abstract class DatabaseBase implements DatabaseType {
         * 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