Page MenuHomePhabricator

Remove etp_user from echo_target_page
Closed, ResolvedPublic

Description

We don't need this field any more, nothing uses it.

Event Timeline

Catrope created this task.Aug 26 2016, 12:36 AM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Hmm, it appears to still be used to mark notifications as read when certain pages are viewed, at https://phabricator.wikimedia.org/diffusion/ECHO/browse/master/Hooks.php;c82e3905916b77854a00f72155b119adffabb443$788 .

@SBisson Is it right that we still use etp_user there?

Hmm, it appears to still be used to mark notifications as read when certain pages are viewed, at https://phabricator.wikimedia.org/diffusion/ECHO/browse/master/Hooks.php;c82e3905916b77854a00f72155b119adffabb443$788 .
@SBisson Is it right that we still use etp_user there?

etp_user is technically used to populate and query echo_target_page but it doesn't do anything useful. There is nothing user-specific about the relationship between events and pages that is maintained in this table. We still mark notifications as read when a user visits a page but we don't delete the row associated with this user and that page.

etp_user is technically used to populate and query echo_target_page but it doesn't do anything useful. There is nothing user-specific about the relationship between events and pages that is maintained in this table. We still mark notifications as read when a user visits a page but we don't delete the row associated with this user and that page.

Right, so I guess we can change that query to find all unread notifications for the user and join against etp to find only the ones relevant to the current page, rather than getting the user's entries in the etp table. I'll work on that.

Catrope claimed this task.Aug 29 2016, 9:24 PM

Change 309051 had a related patch set uploaded (by Sbisson):
[WIP] Remove etp_user

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

SBisson claimed this task.Sep 8 2016, 2:45 PM
SBisson moved this task from In Development to Needs Review on the Collab-Team-Q1-July-Sep-2016 board.

Change 309051 merged by jenkins-bot:
Remove etp_user

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

Checked in betalabs as general regression testing. Dropped indexes are not seemed to be used.

jmatazzoni closed this task as Resolved.Oct 11 2016, 12:31 AM