Revert "AuthManager: Commit transaction after auto-creating a user"
authorAaron Schulz <aschulz@wikimedia.org>
Sat, 23 Jul 2016 00:00:13 +0000 (17:00 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Thu, 18 Aug 2016 19:36:25 +0000 (19:36 +0000)
81be9512a022 should obviate the main desire for this.
  The normal commit step is now relied upon again.
820f5d6ce57f and a26fbb67054 enforce DBO_TRX transactions.
* Committing the implicit transaction(s) prematurely is bad
  for web request and cross-DB transactionality. Only code
  that has clear outermost DB context (e.g. jobs/maintenance)
  should be doing things like this as it becomes hard to reason
  about (e.g. how much the request/caller needs atomicity
  or whether there is an outer (start|end)Atomic section).

This reverts commit 83c66caa0831086db7c2033ddda38106584060d0.

Change-Id: I1a5533b239e53f2089f239651c6fdf97e51c9062

includes/auth/AuthManager.php

index 50e370e..b4ce16f 100644 (file)
@@ -1688,13 +1688,9 @@ class AuthManager implements LoggerAwareInterface {
                        $logEntry->setParameters( [
                                '4::userid' => $user->getId(),
                        ] );
-                       $logid = $logEntry->insert();
+                       $logEntry->insert();
                }
 
-               // Commit database changes, so even if something else later blows up
-               // the newly-created user doesn't get lost.
-               wfGetLBFactory()->commitMasterChanges( __METHOD__ );
-
                $trxProfiler->setSilenced( false );
 
                if ( $login ) {