Last modified: 2013-04-22 16:16:27 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 T43171, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 41171 - User::edits() and User::incEditCount() should be refactored
User::edits() and User::incEditCount() should be refactored
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
unspecified
All All
: Unprioritized normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-10-18 13:38 UTC by Antoine "hashar" Musso (WMF)
Modified: 2013-04-22 16:16 UTC (History)
3 users (show)

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


Attachments

Description Antoine "hashar" Musso (WMF) 2012-10-18 13:38:01 UTC
User::edits() let you fetch a cached number of edit from a slave database. Whenever the field is not yet, we initialize the stats by hitting `revision` table and saving he user editcount.

User::incEditCounts() update the user counter but also does a a lazy initialization albeit from the slave database and is inaccurate (though we probably do not care that much).

Both methods uses the same $dbw->update() statement.


I think there is some potential there to merge both methods in a new clean one :-]
Comment 1 Marius Hoch 2012-10-18 15:39:56 UTC
https://gerrit.wikimedia.org/r/28519
Comment 2 Alexandre Emsenhuber [IAlex] 2012-10-20 16:13:54 UTC
And merged.
Comment 3 Antoine "hashar" Musso (WMF) 2012-10-22 08:37:52 UTC
Thanks!

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


Navigation
Links