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

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T42340, the corresponding Phabricator task for complete and up-to-date bug report information.
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...
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Maintenance scripts (Other open bugs)
unspecified
All All
: Unprioritized normal (vote)
: ---
Assigned To: Krinkle
:
Depends on:
Blocks:
  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: ---


Attachments

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.


Navigation
Links