Page MenuHomePhabricator

Don't blindly delete and reinsert all settings on save
Closed, ResolvedPublic3 Estimated Story Points


Right now, on global preference save, we delete all the preferences known to the local wiki and reinsert whole dataset, even if only 1 row has changed. Not only this results in increased DB load, it will also cause deadlocks with sufficient concurrency. Just save only the settings that have changed, like most other places we do similar things (e.g. LinksUpdate in core).

Event Timeline

MaxSem created this task.Apr 18 2018, 9:25 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptApr 18 2018, 9:25 PM

Let's do this before problems appear.

TBolliger triaged this task as High priority.May 16 2018, 6:46 PM
TBolliger added a subscriber: TBolliger.


MaxSem updated the task description. (Show Details)Jun 5 2018, 9:29 PM

Seems like potentially a lot of work. We should discuss if this is a blocker for releasing to all Wikipedias.

TBolliger set the point value for this task to 3.Jun 5 2018, 11:39 PM
TBolliger moved this task from To Be Estimated/Discussed to Estimated on the Community-Tech board.
MaxSem claimed this task.Jun 12 2018, 9:45 PM
MaxSem added a project: Community-Tech-Sprint.

Change 440046 had a related patch set uploaded (by MaxSem; owner: MaxSem):
[mediawiki/extensions/GlobalPreferences@master] Make only needed DB operations when saving preferences

Change 440046 merged by jenkins-bot:
[mediawiki/extensions/GlobalPreferences@master] Make only needed DB operations when saving preferences

MaxSem closed this task as Resolved.Jun 14 2018, 1:48 AM
MaxSem moved this task from Needs Review/Feedback to Q1 2018-19 on the Community-Tech-Sprint board.