From 5d20db748ca32d75b19ccb7a661653e957fbd5ae Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Fri, 22 Jul 2016 17:00:13 -0700 Subject: [PATCH] Revert "AuthManager: Commit transaction after auto-creating a user" * 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 | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/includes/auth/AuthManager.php b/includes/auth/AuthManager.php index 50e370e9e6..b4ce16fb24 100644 --- a/includes/auth/AuthManager.php +++ b/includes/auth/AuthManager.php @@ -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 ) { -- 2.20.1