Page MenuHomePhabricator

namespace field in Schema:ChangesListFilters should not be an integer, causes multi-namespace events to be invalid
Closed, ResolvedPublic

Description

We try to stick values like 1;2;3 in an integer field, which is obviously invalid, so now we don't know how many people use multiple namespaces because all those events are dropped.

Details

Related Gerrit Patches:
mediawiki/extensions/WikimediaEvents : masterBump ChangesListFilters schema revision

Event Timeline

Catrope created this task.Jan 10 2018, 7:29 PM
Restricted Application added a project: Collaboration-Team-Triage. · View Herald TranscriptJan 10 2018, 7:29 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Change 404528 had a related patch set uploaded (by Catrope; owner: Catrope):
[mediawiki/extensions/WikimediaEvents@master] Bump ChangesListFilters schema revision

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

Change 404528 merged by jenkins-bot:
[mediawiki/extensions/WikimediaEvents@master] Bump ChangesListFilters schema revision

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

@Catrope - probably unrelated? The click_tracking table still has namespace int(11) (betalabs)

SELECT distinct(TABLE_NAME)  FROM INFORMATION_SCHEMA.COLUMNS WHERE column_name like 'namespace%';
+----------------+
| TABLE_NAME     |
+----------------+
| click_tracking |
+----------------+
[enwiki]> show columns from click_tracking;
+---------------------+----------------+------+-----+---------+-------+
| Field               | Type           | Null | Key | Default | Extra |
+---------------------+----------------+------+-----+---------+-------+
| action_time         | binary(14)     | NO   | MUL | NULL    |       |
| session_id          | varbinary(255) | NO   | MUL | NULL    |       |
| is_logged_in        | tinyint(4)     | NO   |     | NULL    |       |
| user_total_contribs | int(11)        | YES  |     | NULL    |       |
| user_contribs_span1 | int(11)        | YES  |     | NULL    |       |
| user_contribs_span2 | int(11)        | YES  |     | NULL    |       |
| user_contribs_span3 | int(11)        | YES  |     | NULL    |       |
| namespace           | int(11)        | NO   |     | NULL    |       |
| event_id            | int(11)        | NO   | MUL | NULL    |       |
| additional_info     | varbinary(255) | YES  |     | NULL    |       |
+---------------------+----------------+------+-----+---------+-------+
10 rows in set (0.00 sec)

per @Catrope - my previous comment is not relevant to eventlogging actions.

I checked in betalabs - the events adding/removing multiple namespace filters are recorded as any other selection of filters - e.g. the events for userid=11796 are recorded:

{"dt": "2018-01-23T00:00:19", "event": {"action": "filtermenu", "filter": "namespace__3", "groupIdentifier": "e12ff32df68271fc15166656391290.5003633939702857", "userId": 11796}, "recvFrom": "deployment-cache-text04.deployment-prep.eqiad.wmflabs", "revision": 17008168, "schema": "ChangesListFilterGrouping", "seqId": 4039635, "userAgent": {"browser_family": "Safari", "browser_major": "10", "browser_minor": "1", "device_family": "Other", "is_bot": false, "is_mediawiki": false, "os_family": "Mac OS X", "os_major": "10", "os_minor": "10", "wmf_app_version": "-"}, "uuid": "a2a86bc8bdf65c0099dba822a3ae717b", "webHost": "en.wikipedia.beta.wmflabs.org", "wiki": "enwiki"}

However, I noticed that every three seconds the log entry is made due to automatic updates for 'View newest changes'. It could not possible mess up our stats?
The entry looks like the following:

{"dt": "2018-01-22T23:32:57", "event": {"enhancedFiltersEnabled": true, "hideWikibase": true, "hidecategorization": true, "pagename": "Recentchanges", "userId": 11796}, "recvFrom": "deployment-cache-text04.deployment-prep.eqiad.wmflabs", "revision": 17629781, "schema": "ChangesListFilters", "seqId": 4020374, "userAgent": {"browser_family": "Safari", "browser_major": "10", "browser_minor": "1", "device_family": "Other", "is_bot": false, "is_mediawiki": false, "os_family": "Mac OS X", "os_major": "10", "os_minor": "10", "wmf_app_version": "-"}, "uuid": "6cf49996201553288d3409a315c812b3", "webHost": "en.wikipedia.beta.wmflabs.org", "wiki": "enwiki"}
Etonkovidova closed this task as Resolved.Jan 23 2018, 12:27 AM
238482n375 removed Catrope as the assignee of this task.Jun 15 2018, 8:03 AM
238482n375 triaged this task as Lowest priority.
238482n375 moved this task from Next Up to In Code Review on the Analytics-Kanban board.
238482n375 edited subscribers, added: 238482n375; removed: Aklapper.

SG9tZVBoYWJyaWNhdG9yCk5vIG1lc3NhZ2VzLiBObyBub3RpZmljYXRpb25zLgoKICAgIFNlYXJjaAoKQ3JlYXRlIFRhc2sKTWF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