Page MenuHomePhabricator

Schema:Popups logs "dwelledButAbandoned" and link open events at the same time
Closed, ResolvedPublic3 Estimate Story Points

Description

In the control condition (popupEnabled = 0), the Popups schema frequently generates a dwelledButAbandoned event together with a link opening event during the same link interaction, even though these should be mutually exclusive. These extraneous events happen often enough to affect data analysis, but don't seem to occur in the test condition. (Concretely: here we had about 1.07 events per interaction in the control group but close to 1 in the test group. And in a sample of 100 such events that were logged during the same link interaction as another one, in every case it turned out to be a dwelledButAbandoned event together with a link opening event - sometimes before, sometimes after; see data below.)

For the data analysis in T139319, it would be helpful if, even before fixing and deploying this, we could confirm the conjecture that it's the dwelledButAbandoned events that are spurious and the link open events that are real - i.e. that a link was clicked in each case. That would enable us to remove the spurious events retroactively and still arrive at valid conclusions.

Data:

SELECT dupetokenlist.event_linkInteractionToken AS token, event_action AS action, event_totalInteractionTime AS totalInteractionTime
FROM 
	(SELECT event_linkInteractionToken,	COUNT(*) AS copies 
	FROM log.Popups_15597282
	WHERE wiki ='huwiki' AND event_isAnon = 1 
	AND event_popupEnabled = 0
	AND timestamp LIKE '20160703%'
	AND event_linkInteractionToken IS NOT NULL
	GROUP BY event_linkInteractionToken
	HAVING copies>1) AS dupetokenlist
JOIN 
	(SELECT * FROM log.Popups_15597282
	WHERE wiki ='huwiki' AND event_isAnon = 1 
	AND event_popupEnabled = 0
	AND timestamp LIKE '20160703%'
	AND event_linkInteractionToken IS NOT NULL) AS allevents
ON dupetokenlist.event_linkInteractionToken = allevents.event_linkInteractionToken
ORDER BY token, totalInteractionTime
LIMIT 100;
+-------------------------------+---------------------+----------------------+
| token                         | action              | totalInteractionTime |
+-------------------------------+---------------------+----------------------+
| 0002b8eb971b49241467560002738 | dwelledButAbandoned |                  344 |
| 0002b8eb971b49241467560002738 | opened in same tab  |               106081 |
| 0011597228b58a8d1467567900673 | opened in new tab   |                 1327 |
| 0011597228b58a8d1467567900673 | dwelledButAbandoned |                 1741 |
| 0027ff2084b0e8161467584455898 | opened in same tab  |                  122 |
| 0027ff2084b0e8161467584455898 | dwelledButAbandoned |                 1060 |
| 0040b84139bbddd71467530011861 | opened in new tab   |                  172 |
| 0040b84139bbddd71467530011861 | dwelledButAbandoned |                  727 |
| 00528ab4d5dc19071467580971197 | opened in same tab  |                  727 |
| 00528ab4d5dc19071467580971197 | dwelledButAbandoned |                  970 |
| 005454fff10686c51467563014296 | opened in same tab  |                  580 |
| 005454fff10686c51467563014296 | dwelledButAbandoned |                  962 |
| 00760eb22f0ac9ef1467535068375 | opened in new tab   |                 2724 |
| 00760eb22f0ac9ef1467535068375 | dwelledButAbandoned |                 2894 |
| 00a31b38f1b220271467510064741 | opened in same tab  |                  198 |
| 00a31b38f1b220271467510064741 | dwelledButAbandoned |                  277 |
| 00a753fe56c87a9f1467541889086 | dwelledButAbandoned |                 4168 |
| 00a753fe56c87a9f1467541889086 | opened in same tab  |                 8745 |
| 00af45051944dc4b1467534006492 | opened in same tab  |                  139 |
| 00af45051944dc4b1467534006492 | dwelledButAbandoned |                  343 |
| 00cae0cba58a96711467576069062 | opened in same tab  |                  951 |
| 00cae0cba58a96711467576069062 | dwelledButAbandoned |                 1185 |
| 00d0bac32641eff91467542732890 | opened in same tab  |                  250 |
| 00d0bac32641eff91467542732890 | dwelledButAbandoned |                  406 |
| 0109531b05d4d83b1467533661677 | opened in same tab  |                  140 |
| 0109531b05d4d83b1467533661677 | dwelledButAbandoned |                  361 |
| 012fbfaaa2f85a1d1467538703297 | opened in same tab  |                  382 |
| 012fbfaaa2f85a1d1467538703297 | dwelledButAbandoned |                  450 |
| 0135d18ce3a7114f1467577154736 | opened in new tab   |                  556 |
| 0135d18ce3a7114f1467577154736 | dwelledButAbandoned |                  610 |
| 0138680825976b7f1467559316335 | opened in same tab  |                  248 |
| 0138680825976b7f1467559316335 | dwelledButAbandoned |                  514 |
| 013c5e93312e0c331467574179384 | opened in new tab   |                 1618 |
| 013c5e93312e0c331467574179384 | dwelledButAbandoned |                 1737 |
| 013e93403e6a8dbe1467575034829 | opened in new tab   |                  800 |
| 013e93403e6a8dbe1467575034829 | dwelledButAbandoned |                 1340 |
| 01550f5737b7b1c91467553566415 | opened in same tab  |                  115 |
| 01550f5737b7b1c91467553566415 | dwelledButAbandoned |                  689 |
| 017c2b7c63756f5f1467550194078 | opened in same tab  |                  408 |
| 017c2b7c63756f5f1467550194078 | dwelledButAbandoned |                  527 |
| 019d29dd35da59011467546257994 | opened in same tab  |                  619 |
| 019d29dd35da59011467546257994 | dwelledButAbandoned |                  889 |
| 01a5b5bffc403db21467549871016 | opened in same tab  |                  687 |
| 01a5b5bffc403db21467549871016 | dwelledButAbandoned |                  921 |
| 01a73b2b7e28342d1467568433642 | opened in same tab  |                  694 |
| 01a73b2b7e28342d1467568433642 | dwelledButAbandoned |                  761 |
| 01b505b7f2187a061467567338499 | opened in same tab  |                  565 |
| 01b505b7f2187a061467567338499 | dwelledButAbandoned |                  664 |
| 01edde8aaa0ca0f11467560007248 | opened in same tab  |                  565 |
| 01edde8aaa0ca0f11467560007248 | dwelledButAbandoned |                  682 |
| 01fcfe56349e4fa71467650754289 | opened in same tab  |                 1048 |
| 01fcfe56349e4fa71467650754289 | dwelledButAbandoned |                 1136 |
| 020a3855995cf0bf1467575343903 | opened in same tab  |                  233 |
| 020a3855995cf0bf1467575343903 | dwelledButAbandoned |                  413 |
| 0216c83efe9546011467542510248 | dwelledButAbandoned |                  683 |
| 0216c83efe9546011467542510248 | opened in same tab  |                 3695 |
| 021cee055c6b61051467576786137 | opened in same tab  |                  570 |
| 021cee055c6b61051467576786137 | dwelledButAbandoned |                  670 |
| 023229da9b7d7bc41467531325233 | opened in same tab  |                  180 |
| 023229da9b7d7bc41467531325233 | dwelledButAbandoned |                 1879 |
| 0244af01cf37f5101467554243558 | opened in same tab  |                  202 |
| 0244af01cf37f5101467554243558 | dwelledButAbandoned |                 2814 |
| 025aacb2d4a262511467537720859 | opened in same tab  |                  766 |
| 025aacb2d4a262511467537720859 | dwelledButAbandoned |                  875 |
| 0270e1bdb54dd9b71467567712467 | opened in same tab  |                 2666 |
| 0270e1bdb54dd9b71467567712467 | dwelledButAbandoned |                 2755 |
| 027b9bb8a2cfffd21467555050046 | opened in same tab  |                  450 |
| 027b9bb8a2cfffd21467555050046 | dwelledButAbandoned |                  543 |
| 027cbde7009f175a1467586782123 | opened in same tab  |                  363 |
| 027cbde7009f175a1467586782123 | dwelledButAbandoned |                  442 |
| 028391cd153975771467559878812 | opened in same tab  |                 1062 |
| 028391cd153975771467559878812 | dwelledButAbandoned |                 3375 |
| 028ef558c7453beb1467538876733 | opened in same tab  |                  220 |
| 028ef558c7453beb1467538876733 | dwelledButAbandoned |                  446 |
| 028f9ce9a4c9a1351467571656427 | opened in same tab  |                  493 |
| 028f9ce9a4c9a1351467571656427 | dwelledButAbandoned |                  567 |
| 028fe8dd6e8d182c1467545233372 | dwelledButAbandoned |                  408 |
| 028fe8dd6e8d182c1467545233372 | opened in same tab  |                83772 |
| 0290ffa09c81721e1467575212222 | opened in new tab   |                  492 |
| 0290ffa09c81721e1467575212222 | dwelledButAbandoned |                  616 |
| 0294a2bb73740b281467546388668 | dwelledButAbandoned |                  890 |
| 0294a2bb73740b281467546388668 | opened in same tab  |                 5484 |
| 029f3017e369428a1467528485216 | opened in same tab  |                  151 |
| 029f3017e369428a1467528485216 | dwelledButAbandoned |                  271 |
| 02a161306221385f1467537690210 | opened in same tab  |                  370 |
| 02a161306221385f1467537690210 | dwelledButAbandoned |                  618 |
| 02b91fa5010c2c421467571199143 | dwelledButAbandoned |                  927 |
| 02b91fa5010c2c421467571199143 | opened in same tab  |                 6009 |
| 02bac351552bae5d1467532745330 | opened in same tab  |                  664 |
| 02bac351552bae5d1467532745330 | dwelledButAbandoned |                  923 |
| 02c1ea9592c5ec7d1467539077765 | opened in same tab  |                  219 |
| 02c1ea9592c5ec7d1467539077765 | dwelledButAbandoned |                 2360 |
| 02c84258744987721467565005518 | opened in same tab  |                  767 |
| 02c84258744987721467565005518 | dwelledButAbandoned |                 1056 |
| 02cc8d06e412ed4e1467524093472 | opened in same tab  |                  162 |
| 02cc8d06e412ed4e1467524093472 | dwelledButAbandoned |                  551 |
| 02cecda98c42b9d81467568110869 | opened in same tab  |                 1842 |
| 02cecda98c42b9d81467568110869 | dwelledButAbandoned |                 1937 |
| 02dc10baf14feeb51467537863976 | opened in same tab  |                  829 |
| 02dc10baf14feeb51467537863976 | dwelledButAbandoned |                 1203 |
+-------------------------------+---------------------+----------------------+
100 rows in set (36.10 sec)

Event Timeline

Restricted Application added subscribers: Zppix, Aklapper. · View Herald TranscriptJul 15 2016, 5:54 PM

@Tbayer, I was able to induce this behavior with the GPRS profile for the control condition (just like the test group) with a click, followed by dragging away from the event.

{"event":{"pageTitleSource":"Main Page","namespaceIdSource":0,"pageIdSource":1,"isAnon":true,"popupEnabled":false,"popupDelay":500,"pageToken":"fb7612f7cf593cb61468642928817ff4d6aa39a70f189","sessionToken":"3637ae8931dc6aa2","version":"legacy","api":"mwapi","pageTitleHover":"Test","action":"opened in same tab","totalInteractionTime":95,"linkInteractionToken":"5aecf4fa87446a291468642943439","previewCountBucket":"0 previews","namespaceIdHover":0},"revision":15597282,"schema":"Popups","webHost":"reading-web-staging.wmflabs.org","wiki":"wiki"};:

{"event":{"pageTitleSource":"Main Page","namespaceIdSource":0,"pageIdSource":1,"isAnon":true,"popupEnabled":false,"popupDelay":500,"pageToken":"fb7612f7cf593cb61468642928817ff4d6aa39a70f189","sessionToken":"3637ae8931dc6aa2","version":"legacy","api":"mwapi","pageTitleHover":"Test","action":"dwelledButAbandoned","totalInteractionTime":609,"linkInteractionToken":"5aecf4fa87446a291468642943439","previewCountBucket":"0 previews","namespaceIdHover":0},"revision":15597282,"schema":"Popups","webHost":"reading-web-staging.wmflabs.org","wiki":"wiki"};:

@bmansurov, @phuedx, same question here: does your read of the code suggest this would be expected in its current state?

According to https://github.com/wikimedia/mediawiki-extensions-Popups/blob/master/resources/ext.popups.schemaPopups.js#L16 only one action is allowed per interaction token, unless the action is "disabled", which takes two clicks to get to.

As trackSubscribe is async and as we're saving the previous log data after doing the check in the above link (https://github.com/wikimedia/mediawiki-extensions-Popups/blob/master/resources/ext.popups.schemaPopups.js#L28) there maybe a race condition, but in theory JS is single threaded so this should not happen. In practice though, we may have come across a situation remotely similar to the one described in http://stackoverflow.com/a/2734311 although there are conflicting comments on that page.

Tbayer added a comment.EditedJul 18 2016, 8:13 PM

Thanks @dr0ptp4kt and @bmansurov for these insights! After looking further into the data, it appears that this problem started to happen only on June 16 (before that, the duplicate events rate in the control group was similarly low as in the test group; and from inspecting a sample it also seems that these had the same, different reason - more on that later [edit:] now at T139319#2472745 ).
Was there any software change that went live around that time?

SELECT yearmonthday, popupEnabled, COUNT(*) AS dupes FROM
(SELECT LEFT(timestamp, 8) AS yearmonthday, event_popupEnabled AS popupEnabled, event_linkInteractionToken,	COUNT(*) AS copies 
	FROM log.Popups_15597282
	WHERE wiki ='huwiki' AND event_isAnon = 1 
	AND event_linkInteractionToken IS NOT NULL
	GROUP BY yearmonthday, popupEnabled, event_linkInteractionToken
	HAVING copies>1) AS dupetokenlist
GROUP BY yearmonthday, popupEnabled
ORDER BY yearmonthday, popupEnabled;
+--------------+--------------+-------+
| yearmonthday | popupEnabled | dupes |
+--------------+--------------+-------+
| 20160603     |            0 |    72 |
| 20160604     |            0 |    82 |
| 20160605     |            0 |   116 |
| 20160606     |            0 |   159 |
| 20160607     |            0 |   200 |
| 20160607     |            1 |     5 |
| 20160608     |            0 |   102 |
| 20160608     |            1 |    83 |
| 20160609     |            0 |    50 |
| 20160609     |            1 |    47 |
| 20160610     |            0 |   368 |
| 20160610     |            1 |    37 |
| 20160611     |            0 |    50 |
| 20160611     |            1 |    56 |
| 20160612     |            0 |    66 |
| 20160612     |            1 |   107 |
| 20160613     |            0 |    39 |
| 20160613     |            1 |    31 |
| 20160614     |            0 |    60 |
| 20160614     |            1 |   113 |
| 20160615     |            0 |    88 |
| 20160615     |            1 |    27 |
| 20160616     |            0 |   964 |
| 20160616     |            1 |   105 |
| 20160617     |            0 |  3075 |
| 20160617     |            1 |    62 |
| 20160618     |            0 |  3297 |
| 20160618     |            1 |    98 |
| 20160619     |            0 |  3704 |
| 20160619     |            1 |    57 |
| 20160620     |            0 |  4406 |
| 20160620     |            1 |   121 |
| 20160621     |            0 |  4528 |
| 20160621     |            1 |    77 |
| 20160622     |            0 |  3404 |
| 20160622     |            1 |    19 |
| 20160623     |            0 |  3348 |
| 20160623     |            1 |    43 |
| 20160624     |            0 |  3223 |
| 20160624     |            1 |    91 |
| 20160625     |            0 |  3193 |
| 20160625     |            1 |    31 |
| 20160626     |            0 |  3713 |
| 20160626     |            1 |    73 |
| 20160627     |            0 |  4755 |
| 20160627     |            1 |    83 |
| 20160628     |            0 |  4708 |
| 20160628     |            1 |   154 |
| 20160629     |            0 |  3313 |
| 20160629     |            1 |    29 |
| 20160630     |            0 |  3321 |
| 20160630     |            1 |    27 |
| 20160701     |            0 |  2815 |
| 20160701     |            1 |    15 |
| 20160702     |            0 |  3454 |
| 20160702     |            1 |    35 |
| 20160703     |            0 |  3703 |
| 20160703     |            1 |    72 |
| 20160704     |            0 |  3844 |
| 20160704     |            1 |    25 |
| 20160705     |            0 |  3527 |
| 20160705     |            1 |    61 |
| 20160706     |            0 |  3766 |
| 20160706     |            1 |    73 |
| 20160707     |            0 |  4112 |
| 20160707     |            1 |     9 |
| 20160708     |            0 |  3390 |
| 20160708     |            1 |    41 |
| 20160709     |            0 |  3510 |
| 20160709     |            1 |   132 |
| 20160710     |            0 |  4402 |
| 20160710     |            1 |    65 |
| 20160711     |            0 |  3534 |
| 20160711     |            1 |    32 |
| 20160712     |            0 |  3792 |
| 20160712     |            1 |    21 |
| 20160713     |            0 |  4087 |
| 20160713     |            1 |    30 |
| 20160714     |            0 |  4670 |
| 20160714     |            1 |    43 |
| 20160715     |            0 |  3953 |
| 20160715     |            1 |     4 |
| 20160716     |            0 |  3684 |
| 20160716     |            1 |    32 |
| 20160717     |            0 |  4493 |
| 20160717     |            1 |    19 |
| 20160718     |            0 |  3040 |
| 20160718     |            1 |    83 |
+--------------+--------------+-------+
88 rows in set (2 min 44.81 sec)

@Tbayer, I'm not sure. Nothing stood out to me from Reading-Web-Sprint-74-Page-views-page-views-PAGE-VIEWS (filtered on all tasks). @bmansurov, anything in sprint 74 or 73 or in an upstream repo you can think of?

For a second I thought https://gerrit.wikimedia.org/r/#/c/288724/, merged June 6, would have been related and rolled out on the train on the 16th. But June 6 was a Monday and the train rolled to production Wikipedias June 9 as I understand so that code was probably already in place a week prior to June 16. This said, if there were stale HTML objects in the cache, it might have been that as they fell out of the cache there was an uptick. What I've heard is that generally most cached pages are out of the cache within 7 days. The seven day distance between June 9 and June 16 may merely be a coincidence, as I understand things fall out of cache pretty fast.

Merely for the sake of recall: recall that we went from 1% to 50% Hovercards ON on June 7 in T136713: Increase ON percentage for Hovercards A/B test 1, too.

Thinking outside of the codebase for a second: is this behaviour uniform across browsers, and perhaps browser versions too? When do we scrub the UA from the event capsule?

User agents are preserved for 90 days for this schema, so we could still run checks for before/after June 16.

jhobs triaged this task as Medium priority.Jul 21 2016, 8:18 PM
jhobs moved this task from Incoming to Triaged but Future on the Readers-Web-Backlog board.
ovasileva raised the priority of this task from Medium to High.Sep 16 2016, 12:01 PM
ovasileva set the point value for this task to 3.Oct 19 2016, 4:21 PM
ovasileva added a subscriber: ovasileva.

from backlog grooming, giving this 3 points in order to make an allocation for it within the sprint. If it gets bigger than 3 points within the spring, we can pause and reevaluate whether it needs a spike.

It looks like this bug may since have been fixed by other changes. To recap, back in June/July we had about 1.07 events per link interaction in the control group but close to 1 in the test group (per the the earlier query quoted in the task description). This contradicted the fact that (with the rare exception of the "tapped settings cog" --> "disabled" sequence in the test condition), there should only be one event per link interaction.

Repeating this query for the current version of the schema, this number is now very close to 1 (instead of 1.07) in the control group too:

SELECT event_popupEnabled, AVG(events_per_token), COUNT(*) AS interactions FROM (
  SELECT event_popupEnabled, event_linkInteractionToken, COUNT(*) AS events_per_token 
  FROM log.Popups_15906495
  WHERE wiki ='huwiki' AND event_isAnon = 1 
  AND LEFT(timestamp, 6) LIKE '201610'
  AND event_linkInteractionToken IS NOT NULL
  GROUP BY event_popupEnabled, event_linkInteractionToken) AS interactions
GROUP BY event_popupEnabled;
+--------------------+-----------------------+--------------+
| event_popupEnabled | AVG(events_per_token) | interactions |
+--------------------+-----------------------+--------------+
|                  0 |                1.0028 |      4098562 |
|                  1 |                1.0013 |      3715053 |
+--------------------+-----------------------+--------------+
2 rows in set (8 min 59.27 sec)

Also, inspecting two samples of the remaining duplicates as in the task description, these now no longer consist of a dwelledButAbandoned plus a link opening event, but are all pairs where both the event type and the interaction time are identical.

# repeat query for dupes from https://phabricator.wikimedia.org/T140485 
# for (right after launch of) current schema:
SELECT dupetokenlist.event_linkInteractionToken AS token, event_action AS action, event_totalInteractionTime AS totalInteractionTime
FROM 
	(SELECT event_linkInteractionToken,	COUNT(*) AS copies 
	FROM log.Popups_15906495
	WHERE wiki ='huwiki' AND event_isAnon = 1 
	AND event_popupEnabled = 0
	AND timestamp LIKE '20160925%'
	AND event_linkInteractionToken IS NOT NULL
	GROUP BY event_linkInteractionToken
	HAVING copies>1) AS dupetokenlist
JOIN 
	(SELECT * FROM log.Popups_15906495
	WHERE wiki ='huwiki' AND event_isAnon = 1 
	AND event_popupEnabled = 0
	AND timestamp LIKE '20160925%'
	AND event_linkInteractionToken IS NOT NULL) AS allevents
ON dupetokenlist.event_linkInteractionToken = allevents.event_linkInteractionToken
ORDER BY token, totalInteractionTime
LIMIT 100;

+-------------------------------+---------------------+----------------------+
| token                         | action              | totalInteractionTime |
+-------------------------------+---------------------+----------------------+
| 005c91ce7df6b9321474811775881 | dwelledButAbandoned |                   16 |
| 005c91ce7df6b9321474811775881 | dwelledButAbandoned |                   16 |
| 01adc227a22ded021474839735235 | dwelledButAbandoned |                  116 |
| 01adc227a22ded021474839735235 | dwelledButAbandoned |                  116 |
| 04934d5538b146e71474804860932 | dwelledButAbandoned |                  575 |
| 04934d5538b146e71474804860932 | dwelledButAbandoned |                  575 |
| 04d02a0a508b9d131474832124851 | dwelledButAbandoned |                 5383 |
| 04d02a0a508b9d131474832124851 | dwelledButAbandoned |                 5383 |
| 05227dbc73d1dbfa1474810896669 | dwelledButAbandoned |                    7 |
| 05227dbc73d1dbfa1474810896669 | dwelledButAbandoned |                    7 |
| 07419e7f40eb91d91474804941713 | opened in same tab  |                   68 |
| 07419e7f40eb91d91474804941713 | opened in same tab  |                   68 |
| 0a9f6283766d7a201474821809647 | dwelledButAbandoned |                    9 |
| 0a9f6283766d7a201474821809647 | dwelledButAbandoned |                    9 |
| 0b0a7b66d1e9753f1474831511889 | dwelledButAbandoned |                    9 |
| 0b0a7b66d1e9753f1474831511889 | dwelledButAbandoned |                    9 |
| 0b90e45012a27a841474811771903 | dwelledButAbandoned |                    0 |
| 0b90e45012a27a841474811771903 | dwelledButAbandoned |                    0 |
| 0be995af93d942311474830974441 | dwelledButAbandoned |                  110 |
| 0be995af93d942311474830974441 | dwelledButAbandoned |                  110 |
| 11cf300b2752e4bb1474833735225 | dwelledButAbandoned |                  408 |
| 11cf300b2752e4bb1474833735225 | dwelledButAbandoned |                  408 |
| 16130885d8a920441474831514392 | dwelledButAbandoned |                  288 |
| 16130885d8a920441474831514392 | dwelledButAbandoned |                  288 |
| 183da0758d31e1ed1474810893794 | dwelledButAbandoned |                 1341 |
| 183da0758d31e1ed1474810893794 | dwelledButAbandoned |                 1341 |
| 191b582c4ba727ea1474805075677 | opened in same tab  |                   87 |
| 191b582c4ba727ea1474805075677 | opened in same tab  |                   87 |
| 1a5d7719b702f75c1474786057594 | dwelledButAbandoned |                    4 |
| 1a5d7719b702f75c1474786057594 | dwelledButAbandoned |                    4 |
| 1a5d7719b702f75c1474786057594 | dwelledButAbandoned |                    4 |
| 1a5d7719b702f75c1474786057594 | dwelledButAbandoned |                    4 |
| 1a5d7719b702f75c1474786057594 | dwelledButAbandoned |                    4 |
| 1becbceccc28faab1474821439968 | dwelledButAbandoned |                   16 |
| 1becbceccc28faab1474821439968 | dwelledButAbandoned |                   16 |
| 1c7f6502ecdd16c71474833734761 | dwelledButAbandoned |                  200 |
| 1c7f6502ecdd16c71474833734761 | dwelledButAbandoned |                  200 |
| 1d144e2b83cf4ae31474833736073 | dwelledButAbandoned |                   78 |
| 1d144e2b83cf4ae31474833736073 | dwelledButAbandoned |                   78 |
| 20897778fee4d5901474831515113 | dwelledButAbandoned |                   39 |
| 20897778fee4d5901474831515113 | dwelledButAbandoned |                   39 |
| 24f85a3dffb990771474787123006 | dwelledButAbandoned |                   78 |
| 24f85a3dffb990771474787123006 | dwelledButAbandoned |                   78 |
| 26fdb4e3dd9206261474804860863 | dwelledButAbandoned |                   21 |
| 26fdb4e3dd9206261474804860863 | dwelledButAbandoned |                   21 |
| 281189fa9412337e1474809715348 | dwelledButAbandoned |                   26 |
| 281189fa9412337e1474809715348 | dwelledButAbandoned |                   26 |
| 28504cf6ad4242cc1474787100948 | dwelledButAbandoned |                    0 |
| 28504cf6ad4242cc1474787100948 | dwelledButAbandoned |                    0 |
| 294401e4aa16ed381474787094006 | dwelledButAbandoned |                   15 |
| 294401e4aa16ed381474787094006 | dwelledButAbandoned |                   15 |
| 2961ebd0ec9924b31474786522997 | dwelledButAbandoned |                   40 |
| 2961ebd0ec9924b31474786522997 | dwelledButAbandoned |                   40 |
| 2961ebd0ec9924b31474786522997 | dwelledButAbandoned |                   40 |
| 2984f3e52cc3ddd01474821507112 | dwelledButAbandoned |                  118 |
| 2984f3e52cc3ddd01474821507112 | dwelledButAbandoned |                  118 |
| 29bd36b39ec1ee091474786655021 | dwelledButAbandoned |                   32 |
| 29bd36b39ec1ee091474786655021 | dwelledButAbandoned |                   32 |
| 29bd36b39ec1ee091474786655021 | dwelledButAbandoned |                   32 |
| 2cc08f7bbf83412a1474786990869 | dwelledButAbandoned |                 1185 |
| 2cc08f7bbf83412a1474786990869 | dwelledButAbandoned |                 1185 |
| 2cff029452ff33761474787050579 | dwelledButAbandoned |                   91 |
| 2cff029452ff33761474787050579 | dwelledButAbandoned |                   91 |
| 2d66b8aca1ba9ab61474805018436 | dwelledButAbandoned |                   26 |
| 2d66b8aca1ba9ab61474805018436 | dwelledButAbandoned |                   26 |
| 2f7e394f9ca2888b1474804947119 | dwelledButAbandoned |                   14 |
| 2f7e394f9ca2888b1474804947119 | dwelledButAbandoned |                   14 |
| 30c44333694f83471474786529388 | dwelledButAbandoned |                  120 |
| 30c44333694f83471474786529388 | dwelledButAbandoned |                  120 |
| 30c44333694f83471474786529388 | dwelledButAbandoned |                  120 |
| 30e8cc76cb410ebc1474809716059 | dwelledButAbandoned |                   17 |
| 30e8cc76cb410ebc1474809716059 | dwelledButAbandoned |                   17 |
| 315a74ba42ad64111474787118794 | dwelledButAbandoned |                   94 |
| 315a74ba42ad64111474787118794 | dwelledButAbandoned |                   94 |
| 323d27955273e3ee1474832401962 | dwelledButAbandoned |                  540 |
| 323d27955273e3ee1474832401962 | dwelledButAbandoned |                  540 |
| 331c0cf142e357821474793367258 | dwelledButAbandoned |                   15 |
| 331c0cf142e357821474793367258 | dwelledButAbandoned |                   15 |
| 35cec2f24181f3a11474786507322 | dwelledButAbandoned |                   75 |
| 35cec2f24181f3a11474786507322 | dwelledButAbandoned |                   75 |
| 35cec2f24181f3a11474786507322 | dwelledButAbandoned |                   75 |
| 38ed1156b399f7231474786961397 | dwelledButAbandoned |                   56 |
| 38ed1156b399f7231474786961397 | dwelledButAbandoned |                   56 |
| 3ade91112ed864621474804960751 | dwelledButAbandoned |                  576 |
| 3ade91112ed864621474804960751 | dwelledButAbandoned |                  576 |
| 3ce3486ab46d48991474785821681 | dwelledButAbandoned |                  404 |
| 3ce3486ab46d48991474785821681 | dwelledButAbandoned |                  404 |
| 3ce3486ab46d48991474785821681 | dwelledButAbandoned |                  404 |
| 3ce3486ab46d48991474785821681 | dwelledButAbandoned |                  404 |
| 40e22641b677d41b1474787119262 | dwelledButAbandoned |                   31 |
| 40e22641b677d41b1474787119262 | dwelledButAbandoned |                   31 |
| 41179e3d187e0f051474831515361 | dwelledButAbandoned |                 1237 |
| 41179e3d187e0f051474831515361 | dwelledButAbandoned |                 1237 |
| 4279c12d081b49831474785777204 | dwelledButAbandoned |                   16 |
| 4279c12d081b49831474785777204 | dwelledButAbandoned |                   16 |
| 4279c12d081b49831474785777204 | dwelledButAbandoned |                   16 |
| 4279c12d081b49831474785777204 | dwelledButAbandoned |                   16 |
| 44bfa86013e77ae41474786963277 | dwelledButAbandoned |                  480 |
| 44bfa86013e77ae41474786963277 | dwelledButAbandoned |                  480 |
| 476c0659c128effc1474839659396 | dwelledButAbandoned |                   17 |
+-------------------------------+---------------------+----------------------+
100 rows in set (15.02 sec)



SELECT dupetokenlist.event_linkInteractionToken AS token, event_action AS action, event_totalInteractionTime AS totalInteractionTime
FROM 
	(SELECT event_linkInteractionToken,	COUNT(*) AS copies 
	FROM log.Popups_15906495
	WHERE wiki ='huwiki' AND event_isAnon = 1 
	AND event_popupEnabled = 0
	AND timestamp LIKE '20161101%'
	AND event_linkInteractionToken IS NOT NULL
	GROUP BY event_linkInteractionToken
	HAVING copies>1) AS dupetokenlist
JOIN 
	(SELECT * FROM log.Popups_15906495
	WHERE wiki ='huwiki' AND event_isAnon = 1 
	AND event_popupEnabled = 0
	AND timestamp LIKE '20161101%'
	AND event_linkInteractionToken IS NOT NULL) AS allevents
ON dupetokenlist.event_linkInteractionToken = allevents.event_linkInteractionToken
ORDER BY token, totalInteractionTime
LIMIT 100;
+-------------------------------+---------------------+----------------------+
| token                         | action              | totalInteractionTime |
+-------------------------------+---------------------+----------------------+
| 0004aec5226563de1478030950701 | dwelledButAbandoned |                  568 |
| 0004aec5226563de1478030950701 | dwelledButAbandoned |                  568 |
| 0026aee93526457a1478017818083 | dwelledButAbandoned |                   47 |
| 0026aee93526457a1478017818083 | dwelledButAbandoned |                   47 |
| 0042fa1e4cfdc8451477994978010 | dwelledButAbandoned |                 1002 |
| 0042fa1e4cfdc8451477994978010 | dwelledButAbandoned |                 1002 |
| 019ac27d4a4a30ea1478040725771 | dwelledButAbandoned |                  666 |
| 019ac27d4a4a30ea1478040725771 | dwelledButAbandoned |                  666 |
| 02a98304e8de23ec1477984781388 | dwelledButAbandoned |                   22 |
| 02a98304e8de23ec1477984781388 | dwelledButAbandoned |                   22 |
| 02dd38259576be891477984926450 | dwelledButAbandoned |                   14 |
| 02dd38259576be891477984926450 | dwelledButAbandoned |                   14 |
| 04cca5b1e18505421478040543053 | dwelledButAbandoned |                   49 |
| 04cca5b1e18505421478040543053 | dwelledButAbandoned |                   49 |
| 0563f174c64af18e1477984538946 | dwelledButAbandoned |                  760 |
| 0563f174c64af18e1477984538946 | dwelledButAbandoned |                  760 |
| 07835ef1dd35bbf71477984917777 | dwelledButAbandoned |                  176 |
| 07835ef1dd35bbf71477984917777 | dwelledButAbandoned |                  176 |
| 0857ade7aec26a811478018035777 | dwelledButAbandoned |                  347 |
| 0857ade7aec26a811478018035777 | dwelledButAbandoned |                  347 |
| 0857ade7aec26a811478018035777 | dwelledButAbandoned |                  347 |
| 0c86f23f372f874a1477984527591 | dwelledButAbandoned |                 1459 |
| 0c86f23f372f874a1477984527591 | dwelledButAbandoned |                 1459 |
| 0ca85999b48537fd1477984904345 | dwelledButAbandoned |                   24 |
| 0ca85999b48537fd1477984904345 | dwelledButAbandoned |                   24 |
| 0d207b0873a7236c1477984913433 | dwelledButAbandoned |                   14 |
| 0d207b0873a7236c1477984913433 | dwelledButAbandoned |                   14 |
| 0d6fd72f7d95b7c31477984918353 | dwelledButAbandoned |                  619 |
| 0d6fd72f7d95b7c31477984918353 | dwelledButAbandoned |                  619 |
| 0e58370a98cd7e621478011986601 | dwelledButAbandoned |                   10 |
| 0e58370a98cd7e621478011986601 | dwelledButAbandoned |                   10 |
| 1170f92b45197de91478022190627 | dwelledButAbandoned |                   11 |
| 1170f92b45197de91478022190627 | dwelledButAbandoned |                   11 |
| 125e7e825b604ff51478005634425 | dwelledButAbandoned |                   11 |
| 125e7e825b604ff51478005634425 | dwelledButAbandoned |                   11 |
| 128d340ea66cd9771478014279507 | dwelledButAbandoned |                   95 |
| 128d340ea66cd9771478014279507 | dwelledButAbandoned |                   95 |
| 128dbcda4291d2f41478030979165 | dwelledButAbandoned |                 1272 |
| 128dbcda4291d2f41478030979165 | dwelledButAbandoned |                 1272 |
| 12c80e39d9257aa11478003995872 | dwelledButAbandoned |                   22 |
| 12c80e39d9257aa11478003995872 | dwelledButAbandoned |                   22 |
| 133806b41fde15821478005883629 | dwelledButAbandoned |                    8 |
| 133806b41fde15821478005883629 | dwelledButAbandoned |                    8 |
| 133806b41fde15821478005883629 | dwelledButAbandoned |                    8 |
| 1351eea83fca1e511477984581528 | dwelledButAbandoned |                   32 |
| 1351eea83fca1e511477984581528 | dwelledButAbandoned |                   32 |
| 13dee0319c64b2b41477984911398 | dwelledButAbandoned |                   17 |
| 13dee0319c64b2b41477984911398 | dwelledButAbandoned |                   17 |
| 145ce69f38e56b341478005633899 | dwelledButAbandoned |                  399 |
| 145ce69f38e56b341478005633899 | dwelledButAbandoned |                  399 |
| 1498bfeefecc58401477984913498 | dwelledButAbandoned |                   22 |
| 1498bfeefecc58401477984913498 | dwelledButAbandoned |                   22 |
| 1736c476987d94321477984659351 | dwelledButAbandoned |                   40 |
| 1736c476987d94321477984659351 | dwelledButAbandoned |                   40 |
| 174892a87140a3591477984592328 | dwelledButAbandoned |                  496 |
| 174892a87140a3591477984592328 | dwelledButAbandoned |                  496 |
| 18f45de099bed1b31478030830059 | dwelledButAbandoned |                   10 |
| 18f45de099bed1b31478030830059 | dwelledButAbandoned |                   10 |
| 1b66afbbed9184601478003897095 | dwelledButAbandoned |                   94 |
| 1b66afbbed9184601478003897095 | dwelledButAbandoned |                   94 |
| 1c74c3ce6f845ae31478003992711 | dwelledButAbandoned |                   17 |
| 1c74c3ce6f845ae31478003992711 | dwelledButAbandoned |                   17 |
| 1d6817e834bac8861477984782619 | dwelledButAbandoned |                   24 |
| 1d6817e834bac8861477984782619 | dwelledButAbandoned |                   24 |
| 1e702c9d87e5eb351477984923273 | dwelledButAbandoned |                   88 |
| 1e702c9d87e5eb351477984923273 | dwelledButAbandoned |                   88 |
| 1f44639c12eb1cde1478005948084 | dwelledButAbandoned |                    2 |
| 1f44639c12eb1cde1478005948084 | dwelledButAbandoned |                    2 |
| 21f6e958472b74081478017472163 | dwelledButAbandoned |                   31 |
| 21f6e958472b74081478017472163 | dwelledButAbandoned |                   31 |
| 22e678d2dbb799481478005840345 | dwelledButAbandoned |                   70 |
| 22e678d2dbb799481478005840345 | dwelledButAbandoned |                   70 |
| 22e678d2dbb799481478005840345 | dwelledButAbandoned |                   70 |
| 24c6fb52cd8a64ff1477984900133 | dwelledButAbandoned |                    4 |
| 24c6fb52cd8a64ff1477984900133 | dwelledButAbandoned |                    4 |
| 2525a1c33656a0e71478003892194 | dwelledButAbandoned |                   16 |
| 2525a1c33656a0e71478003892194 | dwelledButAbandoned |                   16 |
| 2533db88efe797561478014278819 | dwelledButAbandoned |                  246 |
| 2533db88efe797561478014278819 | dwelledButAbandoned |                  246 |
| 255e808f1b106eb31477984900635 | dwelledButAbandoned |                   21 |
| 255e808f1b106eb31477984900635 | dwelledButAbandoned |                   21 |
| 2591960c34c0ce411478005958391 | dwelledButAbandoned |                   13 |
| 2591960c34c0ce411478005958391 | dwelledButAbandoned |                   13 |
| 27f24ddb3d6395641478031137661 | opened in same tab  |                   45 |
| 27f24ddb3d6395641478031137661 | opened in same tab  |                   45 |
| 2b1dc4a5da7e0b5e1477984783880 | dwelledButAbandoned |                    2 |
| 2b1dc4a5da7e0b5e1477984783880 | dwelledButAbandoned |                    2 |
| 2e4e1960596663721478005634739 | dwelledButAbandoned |                  295 |
| 2e4e1960596663721478005634739 | dwelledButAbandoned |                  295 |
| 2ee78339df35a50d1478022217493 | dwelledButAbandoned |                   70 |
| 2ee78339df35a50d1478022217493 | dwelledButAbandoned |                   70 |
| 2fe5027382a4b9bb1478022176670 | dwelledButAbandoned |                   80 |
| 2fe5027382a4b9bb1478022176670 | dwelledButAbandoned |                   80 |
| 31d6bac4c47cc3781478003896348 | dwelledButAbandoned |                   14 |
| 31d6bac4c47cc3781478003896348 | dwelledButAbandoned |                   14 |
| 32973bf3a25ed8e91478040731387 | dwelledButAbandoned |                  215 |
| 32973bf3a25ed8e91478040731387 | dwelledButAbandoned |                  215 |
| 32a18e8127f790581478003890059 | dwelledButAbandoned |                  200 |
| 32a18e8127f790581478003890059 | dwelledButAbandoned |                  200 |
| 334f2e27c2727ff61478031004045 | dwelledButAbandoned |                   32 |
+-------------------------------+---------------------+----------------------+
100 rows in set (9.52 sec)

Also, inspecting two samples of the remaining duplicates as in the task description, these now no longer consist of a dwelledButAbandoned plus a link opening event, but are all pairs where both the event type and the interaction time are identical.

PS, for context: These remaining duplicate events looks like an occurrence of T142667 (a longstanding general EventLogging bug).

Jdlrobson changed the task status from Open to Stalled.Nov 23 2016, 4:14 PM
Jdlrobson lowered the priority of this task from High to Medium.
Jdlrobson added a subscriber: Jdlrobson.

This task is likely to be stalled now until the rewrite after which hopefully we can resolve it...

This one is actually stalled

ovasileva changed the task status from Stalled to Open.Feb 16 2017, 6:57 PM

to @Tbayer for reproduction

Is this still an issue @Tbayer @phuedx and @ovasileva

phuedx added a comment.Apr 7 2017, 7:36 AM

I think that it's fair to keep this task open (but stalled) until we're all confident in the EL implementation. In the interest of keeping all EL-related tasks discoverable, I'll create an epic so that all of the tasks can be tracked, tested and signed off together.

Any progress here @Tbayer ? There are lots of bugs on the workboard now that look like this. Might it make sense to fold them into one big task - it's proving quite difficult to keep track of them all.

phuedx closed this task as Resolved.Jul 16 2017, 7:51 AM
phuedx claimed this task.

The current instrumentation is implemented in such a way that these events are mutually exclusive. This was fixed as part of the numerous bug fixes for T161769: Schema:Popups sends extraneous link interaction events in control condition.

I've re-run the query against the table corresponding to the latest version of the Popups schema for the month of July [0]. There are still duplicate events present as we're including events logged before 11th July. However, there are no instances of opened and dwelledButAbandoned events being logged with the same token.

[0]
+------------------+---------------------+----------------------+
| token            | action              | totalInteractionTime |
+------------------+---------------------+----------------------+
| 00560b609423d989 | dwelledButAbandoned |                    0 |
| 00560b609423d989 | dwelledButAbandoned |                    0 |
| 02dd53607ce7743e | dwelledButAbandoned |                   95 |
| 02dd53607ce7743e | dwelledButAbandoned |                   95 |
| 02dd53607ce7743e | dwelledButAbandoned |                   95 |
| 090332431719f19f | dwelledButAbandoned |                  133 |
| 090332431719f19f | dwelledButAbandoned |                  133 |
| 090332431719f19f | dwelledButAbandoned |                  133 |
| 090332431719f19f | dwelledButAbandoned |                  133 |
| 090332431719f19f | dwelledButAbandoned |                  133 |
| 0c15d7942429d35b | dwelledButAbandoned |                   15 |
| 0c15d7942429d35b | dwelledButAbandoned |                   15 |
| 1135df77cc74fdc1 | dwelledButAbandoned |                   63 |
| 1135df77cc74fdc1 | dwelledButAbandoned |                   63 |
| 119cec5bf611de6e | dwelledButAbandoned |                   21 |
| 119cec5bf611de6e | dwelledButAbandoned |                   21 |
| 119cec5bf611de6e | dwelledButAbandoned |                   21 |
| 1212bf76f8079c19 | dwelledButAbandoned |                   12 |
| 1212bf76f8079c19 | dwelledButAbandoned |                   12 |
| 1212bf76f8079c19 | dwelledButAbandoned |                   12 |
| 1212bf76f8079c19 | dwelledButAbandoned |                   12 |
| 1212bf76f8079c19 | dwelledButAbandoned |                   12 |
| 122a8e6f0ca86fee | dwelledButAbandoned |                    7 |
| 122a8e6f0ca86fee | dwelledButAbandoned |                    7 |
| 141566b1e297d0ca | dwelledButAbandoned |                   32 |
| 141566b1e297d0ca | dwelledButAbandoned |                   32 |
| 156c9957a6331fee | opened              |                 1326 |
| 156c9957a6331fee | opened              |                 1326 |
| 15e9e83d53a37736 | dwelledButAbandoned |                   23 |
| 15e9e83d53a37736 | dwelledButAbandoned |                   23 |
| 15e9e83d53a37736 | dwelledButAbandoned |                   23 |
| 16065d982b8d43e5 | opened              |                  926 |
| 16065d982b8d43e5 | opened              |                  926 |
| 1b501524023f859c | dwelledButAbandoned |                    0 |
| 1b501524023f859c | dwelledButAbandoned |                    0 |
| 1e59b58d5dca01ca | opened              |                 2201 |
| 1e59b58d5dca01ca | opened              |                 2201 |
| 1e59b58d5dca01ca | opened              |                 2201 |
| 1e59b58d5dca01ca | opened              |                 2201 |
| 1e59b58d5dca01ca | opened              |                 2201 |
| 224d5c679d0bdd0f | dwelledButAbandoned |                    0 |
| 224d5c679d0bdd0f | dwelledButAbandoned |                    0 |
| 25e3c7f9bfdafa95 | opened              |                 1227 |
| 25e3c7f9bfdafa95 | opened              |                 1227 |
| 25e3c7f9bfdafa95 | opened              |                 1227 |
| 25e3c7f9bfdafa95 | opened              |                 1227 |
| 25e3c7f9bfdafa95 | opened              |                 1227 |
| 2d3c8f12da5b9ca3 | dwelledButAbandoned |                   38 |
| 2d3c8f12da5b9ca3 | dwelledButAbandoned |                   38 |
| 33d7005b6f78d56f | dwelledButAbandoned |                   90 |
| 33d7005b6f78d56f | dwelledButAbandoned |                   90 |
| 33d7005b6f78d56f | dwelledButAbandoned |                   90 |
| 33d7005b6f78d56f | dwelledButAbandoned |                   90 |
| 33d7005b6f78d56f | dwelledButAbandoned |                   90 |
| 37ba63c59d848a89 | dwelledButAbandoned |                   11 |
| 37ba63c59d848a89 | dwelledButAbandoned |                   11 |
| 37ba63c59d848a89 | dwelledButAbandoned |                   11 |
| 3b6ba9cf1766ac0a | dwelledButAbandoned |                   33 |
| 3b6ba9cf1766ac0a | dwelledButAbandoned |                   33 |
| 3b6ba9cf1766ac0a | dwelledButAbandoned |                   33 |
| 4109acd681498e4d | dwelledButAbandoned |                   15 |
| 4109acd681498e4d | dwelledButAbandoned |                   15 |
| 4350ddadde789dd8 | dwelledButAbandoned |                   21 |
| 4350ddadde789dd8 | dwelledButAbandoned |                   21 |
| 4350ddadde789dd8 | dwelledButAbandoned |                   21 |
| 445659f9dda73e47 | dwelledButAbandoned |                   52 |
| 445659f9dda73e47 | dwelledButAbandoned |                   52 |
| 445659f9dda73e47 | dwelledButAbandoned |                   52 |
| 445659f9dda73e47 | dwelledButAbandoned |                   52 |
| 445659f9dda73e47 | dwelledButAbandoned |                   52 |
| 46fee48522f4407b | dwelledButAbandoned |                   63 |
| 46fee48522f4407b | dwelledButAbandoned |                   63 |
| 47f24934cb6132e8 | dwelledButAbandoned |                  827 |
| 47f24934cb6132e8 | dwelledButAbandoned |                  827 |
| 47f24934cb6132e8 | dwelledButAbandoned |                  827 |
| 48ebc413d364ca7b | dwelledButAbandoned |                20501 |
| 48ebc413d364ca7b | dwelledButAbandoned |                20501 |
| 504d2633ea6e3f0c | dwelledButAbandoned |                   12 |
| 504d2633ea6e3f0c | dwelledButAbandoned |                   12 |
| 504d2633ea6e3f0c | dwelledButAbandoned |                   12 |
| 556c07628fc512ac | dwelledButAbandoned |                   23 |
| 556c07628fc512ac | dwelledButAbandoned |                   23 |
| 556c07628fc512ac | dwelledButAbandoned |                   23 |
| 5addbe83efc9e5d5 | dwelledButAbandoned |                  327 |
| 5addbe83efc9e5d5 | dwelledButAbandoned |                  327 |
| 5cb7bebc073d9c59 | dwelledButAbandoned |                 1217 |
| 5cb7bebc073d9c59 | dwelledButAbandoned |                 1217 |
| 5cb7bebc073d9c59 | dwelledButAbandoned |                 1217 |
| 60726443cd712d83 | dwelledButAbandoned |                   17 |
| 60726443cd712d83 | dwelledButAbandoned |                   17 |
| 640edfc8d91e9db7 | dwelledButAbandoned |                   47 |
| 640edfc8d91e9db7 | dwelledButAbandoned |                   47 |
| 6b0ad8d4f3ec2d9b | dwelledButAbandoned |                   78 |
| 6b0ad8d4f3ec2d9b | dwelledButAbandoned |                   78 |
| 6c2e4a799aa3988a | dwelledButAbandoned |                   14 |
| 6c2e4a799aa3988a | dwelledButAbandoned |                   14 |
| 6fe146b405c07e2d | dwelledButAbandoned |                   78 |
| 6fe146b405c07e2d | dwelledButAbandoned |                   78 |
| 750b5793f1ca6101 | dwelledButAbandoned |                 7641 |
| 750b5793f1ca6101 | dwelledButAbandoned |                 7641 |
+------------------+---------------------+----------------------+

SELECT dupetokenlist.event_linkInteractionToken AS token, event_action AS action, event_totalInteractionTime AS totalInteractionTime
FROM 
	(SELECT event_linkInteractionToken,	COUNT(*) AS copies 
	FROM log.Popups_16364296
	WHERE wiki ='huwiki' AND event_isAnon = 1 
	AND event_popupEnabled = 0
	AND timestamp LIKE '201707%'
	AND event_linkInteractionToken IS NOT NULL
	GROUP BY event_linkInteractionToken
	HAVING copies>1) AS dupetokenlist
JOIN 
	(SELECT * FROM log.Popups_16364296
	WHERE wiki ='huwiki' AND event_isAnon = 1 
	AND event_popupEnabled = 0
	AND timestamp LIKE '201707%'
	AND event_linkInteractionToken IS NOT NULL) AS allevents
ON dupetokenlist.event_linkInteractionToken = allevents.event_linkInteractionToken
ORDER BY token, totalInteractionTime
LIMIT 100;