title: User cannot be updated
body: <p>I am using MediaWiki and I experience problem changing any user.</p>
  <p>When I try to make a change, I got:</p>
  <pre><code>MWException from line 3484 of /something//includes/user/User.php: CAS update failed on user_touched. 
  The version of the user to be saved is older than the current version.
  </code></pre>
  <p>Backtrace:</p>
  <pre><code>#0 /something//includes/libs/rdbms/database/Database.php(4461): User-&gt;{closure}(Wikimedia\Rdbms\DatabaseMysqli, string)
  #1 /something//includes/libs/rdbms/database/DBConnRef.php(68): Wikimedia\Rdbms\Database-&gt;doAtomicSection(string, Closure)
  #2 /something//includes/libs/rdbms/database/DBConnRef.php(641): Wikimedia\Rdbms\DBConnRef-&gt;__call(string, array)
  #3 /something//includes/user/User.php(3495): Wikimedia\Rdbms\DBConnRef-&gt;doAtomicSection(string, Closure)
  #4 /something//includes/preferences/DefaultPreferencesFactory.php(1806): User-&gt;saveSettings()
  #5 /something//includes/preferences/DefaultPreferencesFactory.php(1853): MediaWiki\Preferences\DefaultPreferencesFactory-&gt;saveFormData(array, PreferencesFormOOUI, array)
  #6 /something//includes/preferences/DefaultPreferencesFactory.php(1687): MediaWiki\Preferences\DefaultPreferencesFactory-&gt;submitForm(array, PreferencesFormOOUI, array)
  #7 /something//includes/htmlform/HTMLForm.php(707): MediaWiki\Preferences\DefaultPreferencesFactory-&gt;MediaWiki\Preferences\{closure}(array, PreferencesFormOOUI)
  #8 /something//includes/htmlform/HTMLForm.php(597): HTMLForm-&gt;trySubmit()
  #9 /something//includes/htmlform/HTMLForm.php(613): HTMLForm-&gt;tryAuthorizedSubmit()
  #10 /something//includes/specials/SpecialPreferences.php(102): HTMLForm-&gt;show()
  #11 /something//includes/specialpage/SpecialPage.php(600): SpecialPreferences-&gt;execute(NULL)
  #12 /something//includes/specialpage/SpecialPageFactory.php(635): SpecialPage-&gt;run(NULL)
  #13 /something//includes/MediaWiki.php(307): MediaWiki\SpecialPage\SpecialPageFactory-&gt;executePath(Title, RequestContext)
  #14 /something//includes/MediaWiki.php(940): MediaWiki-&gt;performRequest()
  #15 /something//includes/MediaWiki.php(543): MediaWiki-&gt;main()
  #16 /something//index.php(53): MediaWiki-&gt;run()
  #17 /something//index.php(46): wfIndexMain()
  #18 {main}
  </code></pre>
  <p>Log gives more info (but I dont see anything to worry about):</p>
  <pre><code>...
  [UserOptionsManager] Loading options from database
  [DBQuery] Wikimedia\Rdbms\DatabaseMysqlBase::serverIsReadOnly [0s] localhost: SELECT @@GLOBAL.read_only AS Value
  [DBQuery] MediaWiki\User\UserOptionsManager::loadUserOptions [0s] localhost: SELECT up_property,up_value FROM `user_properties` WHERE up_user = 1
  [DBQuery] Wikimedia\Rdbms\DatabaseMysqlBase::serverIsReadOnly [0.001s] localhost: SELECT @@GLOBAL.read_only AS Value
  [DBQuery] MediaWiki\User\UserGroupManager::getUserGroupMemberships [0s] localhost: SELECT ug_user,ug_group,ug_expiry FROM `user_groups` WHERE ug_user = 1
  [DBQuery] Wikimedia\Rdbms\DatabaseMysqlBase::serverIsReadOnly [0s] localhost: SELECT @@GLOBAL.read_only AS Value
  [DBQuery] MediaWiki\User\UserGroupManager::getUserGroupMemberships [0s] localhost: SELECT ug_user,ug_group,ug_expiry FROM `user_groups` WHERE ug_user = 1
  [Parser] Parser::setOutputFlag: set user-signature flag on 'Special:Preferences'; User signature detected
  [DBQuery] Wikimedia\Rdbms\DatabaseMysqlBase::serverIsReadOnly [0.002s] localhost: SELECT @@GLOBAL.read_only AS Value
  [preferences] Created form descriptor for user 'Admin'
  [memcached] getWithSetCallback(global:rdbms-server-readonly:localhost:DB_NAME:): process cache hit
  [DBQuery] Wikimedia\Rdbms\DatabaseMysqlBase::serverIsReadOnly [0.001s] localhost: SELECT @@GLOBAL.read_only AS Value
  [DBQuery] startAtomic: entering level 0 (User::saveSettings)
  [DBQuery] User::saveSettings [0s] localhost: UPDATE `user` SET user_name = 'Admin',user_real_name = '',user_email = '',user_email_authenticated = NULL,user_touched = '20210217095957',user_token = '0e49ef2817',user_email_token = NULL,user_email_token_expires = NULL WHERE user_id = 1 AND user_touched = '19700101003250'
  [preferences] CAS update failed on user_touched for user ID '1' (master read)
  [DBQuery] cancelAtomic: canceling level 0 (User::saveSettings)
  [DBQuery] MWExceptionHandler::rollbackMasterChangesAndLog [0s] localhost: ROLLBACK
  [DBQuery] Wikimedia\Rdbms\Database::ping [0.001s] localhost: SELECT 1 AS ping
  </code></pre>
  <p>Last MediaWiki. I updated it from 1.31 and before I couldn't update users too.</p>
  <p>Any ideas, any hints? Anything would be highly appreciated!</p>