Last modified: 2013-01-08 00:13:41 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 40340 - migrateUserGroup.php should invalidate object cache and update user_touched for affected users
migrateUserGroup.php should invalidate object cache and update user_touched f...
Product: MediaWiki
Classification: Unclassified
Maintenance scripts (Other open bugs)
All All
: Unprioritized normal (vote)
: ---
Assigned To: Krinkle
Depends on:
  Show dependency treegraph
Reported: 2012-09-18 23:17 UTC by Krinkle
Modified: 2013-01-08 00:13 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Description Krinkle 2012-09-18 23:17:33 UTC
Object cache for users can contains users group data (User::saveToCache).

When constructing a User object and getting user groups (via User::getGroups, as done for Special:Listusers, Special:Preferences, API userinfo, mw.config, and user group permissions, pretty much everything) - and there is cache - it means changing user groups will be ineffective.

It will appear as though the user groups haven't changed at all. Just ran into this on a small wiki of mine, took a while to figure out that it was the object cache.
Comment 1 Krinkle 2012-09-18 23:39:59 UTC
I was thinking of adding a simple loop that constructs a User object for the id, verify that the user exists by that Id, and then invalidate cache. But bug 40342 popped up.

Though not a problem right now because whether the account exists or not isn't that much of an issue because User::invalidateCache() makes sure load() is called and double-checks `$this->mId` again.
Comment 2 Krinkle 2012-09-19 00:34:10 UTC
Fix in I22abdba00f8ccf587a3d7696e57970ed4653afc8.
Comment 3 Alex Monk 2013-01-08 00:13:41 UTC
Merged by Aaron Schulz on the 31st.

Note You need to log in before you can comment on or make changes to this bug.