Page MenuHomePhabricator

Echo notification table indexes don't support the new feature changes
Open, HighPublic

Description

Author: bsitu

Description:

  1. Notification creation timestamps is not part of the composite index for retrieving unread notifications. Ordering by notification_timestamp for unread notification may cause problem
  1. We now add filtering by notification types ( eg. flow vs others ), we may want to denormalize echo_notification by adding event_type and add this field to the indexes that needs the filtering.

Version: master
Severity: normal

Details

Reference
bz70363

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 3:46 AM
bzimport added a project: Notifications.
bzimport set Reference to bz70363.
bzimport added a subscriber: Unknown Object (MLST).

I think #1 will be fixed by https://gerrit.wikimedia.org/r/#/c/274690/:

CREATE INDEX /*i*/echo_notification_user_base_read_timestamp_timestamp ON /*_*/echo_notification (no
tification_user, notification_bundle_base, notification_read_timestamp, notification_timestamp, noti
fication_event);

#2 is not done, but could be a good idea.

In light of T143964: Paginate notifications by event ID, not timestamp, I think we should not add notification_timestamp to the unread index, but just notification_event.