Page MenuHomePhabricator

Avoid wl_notificationtimestamp updates on page views
Closed, ResolvedPublic

Description

wl_notificationtimestamp causes DB master writes on page view sometimes. Maybe another field could also be kept in cache that could be bumped, the timestamp check logic would use the highest of both. If the cached one doesn't exist, it could use the DB time. Purges/updates would work via bus (maybe using "set if newer" logic in daemon if really needed), though generally users stick to one DC. Local high priority jobs could update the master DB.

Another option is AJAX post...but that would be annoying for non-JS users and would more traffic.

Event Timeline

aaron created this task.Mar 2 2015, 6:38 PM
aaron claimed this task.
aaron raised the priority of this task from to Normal.
aaron updated the task description. (Show Details)
aaron added subscribers: PleaseStand, gerritbot, bd808 and 2 others.
bd808 set Security to None.
Gilles added a subscriber: Gilles.Apr 2 2015, 12:25 PM
aaron moved this task from Backlog to Doing on the Availability board.Apr 13 2015, 11:12 PM
aaron renamed this task from Augment wl_notificationtimestamp with an in-memory field to Avoid wl_notificationtimestamp updates on page views.Apr 15 2015, 5:05 AM
aaron updated the task description. (Show Details)

Change 204219 had a related patch set uploaded (by Aaron Schulz):
[WIP] Made wl_notificationtimestamp updates able to use queues

https://gerrit.wikimedia.org/r/204219

aaron moved this task from Doing to Blocked on the Availability board.Apr 27 2015, 8:41 PM

Change 204219 merged by jenkins-bot:
Made wl_notificationtimestamp updates able to use queues

https://gerrit.wikimedia.org/r/204219

Change 206862 had a related patch set uploaded (by Aaron Schulz):
Set $wgActivityUpdatesUseJobQueue

https://gerrit.wikimedia.org/r/206862

Nemo_bis added a subscriber: Nemo_bis.

Does this mean that a user could receive an email notification for a page they already visited since the notified change happened, simply because the timestamp was not updated yet?

At a minimum, this job queue will need to be in the high priority group, right?

Cc author of the WatchAnalytics extension which uses this field.

Change 206862 abandoned by Aaron Schulz:
Set $wgActivityUpdatesUseJobQueue

Reason:
Per https://gerrit.wikimedia.org/r/224978

https://gerrit.wikimedia.org/r/206862

Change 224978 had a related patch set uploaded (by Aaron Schulz):
Use deferred updates in place of $wgActivityUpdatesUseJobQueue for simplicity

https://gerrit.wikimedia.org/r/224978

Change 224978 merged by jenkins-bot:
Use deferred updates in place of $wgActivityUpdatesUseJobQueue

https://gerrit.wikimedia.org/r/224978

aaron closed this task as Resolved.Jul 16 2015, 10:13 PM

Using post-sending is good enough (even on the GET).