Research talk:VisualEditor's effect on newly registered editors/Work log/2015-04-13

From Meta, a Wikimedia project coordination wiki
Jump to navigation Jump to search

Monday, April 13, 2015[edit]

Duplicate schema ID[edit]

Working on duplicate schemaID bug today. First, let's find some duplicates.

> SELECT
    ->   event_editor,
    ->   COUNT(*) AS sessions,
    ->   SUM(revisions > 1) AS cross_revision,
    ->   SUM(pages > 1) AS cross_page,
    ->   SUM(users > 1) AS cross_user
    -> FROM (
    ->   SELECT
    ->     event_editingSessionId,
    ->     event_editor,
    ->     COUNT(DISTINCT `event_page.revid`) AS revisions,
    ->     COUNT(DISTINCT `event_page.id`) AS pages,
    ->     COUNT(DISTINCT `event_user.id`) AS users
    ->   FROM Edit_11448630
    ->   WHERE
    ->     timestamp BETWEEN "20150401" AND "20150402" AND
    ->     event_action = "saveSuccess"
    ->   GROUP BY 1
    -> ) AS session_counts
    -> GROUP BY 1;
+--------------+----------+----------------+------------+------------+
| event_editor | sessions | cross_revision | cross_page | cross_user |
+--------------+----------+----------------+------------+------------+
| visualeditor |    13416 |              0 |          0 |          0 |
| wikitext     |   309795 |            627 |          3 |          0 |
+--------------+----------+----------------+------------+------------+
2 rows in set (49.02 sec)

It looks like Wikitext is the only interface affected which matches what I heard from User:DAndreescu.

> SELECT
    ->   event_editingSessionId,
    ->   event_editor,
    ->   COUNT(DISTINCT `event_page.revid`) AS revisions,
    ->   COUNT(DISTINCT `event_page.id`) AS pages,
    ->   COUNT(DISTINCT `event_user.id`) AS users
    -> FROM Edit_11448630
    -> WHERE
    ->   timestamp BETWEEN "20150401" AND "20150402" AND
    ->   event_action = "saveSuccess"
    -> GROUP BY 1
    -> HAVING revisions > 1
    -> LIMIT 10;
+----------------------------------+--------------+-----------+-------+-------+
| event_editingSessionId           | event_editor | revisions | pages | users |
+----------------------------------+--------------+-----------+-------+-------+
| 004132dfc66adbd0421e19c118c2b5c5 | wikitext     |         2 |     1 |     1 |
| 00463e1082b8fe060c77b7a9abd8780e | wikitext     |         2 |     1 |     1 |
| 006f827f0d8c7694f564954bf0d600bb | wikitext     |         2 |     1 |     1 |
| 00eff6dedbb7e411fe2b2229402338ce | wikitext     |         2 |     1 |     1 |
| 01200d51387bd6962394a4b402e1525c | wikitext     |         2 |     1 |     1 |
| 02478a7c0de3508a7b7154b9222754ea | wikitext     |         2 |     1 |     1 |
| 024bb21c7ee46697d3a4320a843ddef5 | wikitext     |         2 |     1 |     1 |
| 027094b3548bb19775a0a44c53d0868b | wikitext     |         2 |     1 |     1 |
| 027321be6a3f6c12c7a2fdbf32ba6fa4 | wikitext     |         3 |     1 |     1 |
| 02b4f8254c5fa53a7dc7060c59135b4e | wikitext     |         2 |     1 |     1 |
+----------------------------------+--------------+-----------+-------+-------+
10 rows in set (44.24 sec)
> SELECT
    ->   event_action,
    ->   timestamp,
    ->   `event_page.revid`,
    ->   `event_page.id`,
    ->   `event_user.id`
    -> FROM Edit_11448630
    -> WHERE 
    ->   timestamp BETWEEN "20150401" AND "20150402" AND
    ->   event_editingSessionId = "004132dfc66adbd0421e19c118c2b5c5"
    -> ORDER BY id;
+--------------+----------------+------------------+---------------+---------------+
| event_action | timestamp      | event_page.revid | event_page.id | event_user.id |
+--------------+----------------+------------------+---------------+---------------+
| init         | 20150401091411 |        654465540 |      42906423 |      <snip>   |
| ready        | 20150401091418 |                0 |      42906423 |      <snip>   |
| saveAttempt  | 20150401092140 |        654465540 |      42906423 |      <snip>   |
| saveSuccess  | 20150401092140 |        654468401 |      42906423 |      <snip>   |
| saveFailure  | 20150401092156 |        654468401 |      42906423 |      <snip>   |
| saveAttempt  | 20150401092156 |        654468401 |      42906423 |      <snip>   |
| ready        | 20150401092211 |                0 |      42906423 |      <snip>   |
| saveSuccess  | 20150401092356 |        654468588 |      42906423 |      <snip>   |
| saveAttempt  | 20150401092356 |        654468401 |      42906423 |      <snip>   |
+--------------+----------------+------------------+---------------+---------------+
9 rows in set (59.44 sec)

So, it looks like there are two sessions here. It also looks like some of the events are out of order.

The events leading to 654468401 should look like this:

  • init on 654465540
  • ready on ??? (0)
  • saveAttempt on 654465540
  • saveSuccess on 654468401
  • saveAttempt on 654468401 (accidentally clicked save twice?)
  • saveFailure on 654468401 (editConflict)
  • ready on ??? (0) (page refresh?)
  • saveAttempt on 654468401
  • saveSuccess on 654468588

Note the lack of another init. Where does the init event happen for wikitext? I don't know, but if init is when the session_id is generated, that might be the cause. Let's see if the other dupe sessions have a single event.

> SELECT
    ->   event_editingSessionId,
    ->   COUNT(*)
    -> FROM Edit_11448630
    -> WHERE 
    ->   timestamp BETWEEN "20150401" AND "20150402" AND
    ->   event_editingSessionId IN (
    ->     "004132dfc66adbd0421e19c118c2b5c5",
    ->     "00463e1082b8fe060c77b7a9abd8780e",
    ->     "006f827f0d8c7694f564954bf0d600bb",
    ->     "00eff6dedbb7e411fe2b2229402338ce",
    ->     "01200d51387bd6962394a4b402e1525c",
    ->     "02478a7c0de3508a7b7154b9222754ea",
    ->     "024bb21c7ee46697d3a4320a843ddef5",
    ->     "027094b3548bb19775a0a44c53d0868b",
    ->     "027321be6a3f6c12c7a2fdbf32ba6fa4",
    ->     "02b4f8254c5fa53a7dc7060c59135b4e"
    ->   ) AND
    ->   event_action = "init"
    -> GROUP BY 1;
+----------------------------------+----------+
| event_editingSessionId           | COUNT(*) |
+----------------------------------+----------+
| 004132dfc66adbd0421e19c118c2b5c5 |        1 |
| 00463e1082b8fe060c77b7a9abd8780e |        1 |
| 006f827f0d8c7694f564954bf0d600bb |        1 |
| 00eff6dedbb7e411fe2b2229402338ce |        1 |
| 01200d51387bd6962394a4b402e1525c |        1 |
| 02478a7c0de3508a7b7154b9222754ea |        1 |
| 024bb21c7ee46697d3a4320a843ddef5 |        1 |
| 027094b3548bb19775a0a44c53d0868b |        1 |
| 027321be6a3f6c12c7a2fdbf32ba6fa4 |        1 |
| 02b4f8254c5fa53a7dc7060c59135b4e |        1 |
+----------------------------------+----------+
10 rows in set (1 min 2.23 sec)

Aha! I wonder if that happens all of the time.

> SELECT
    ->   init_events,
    ->   COUNT(*)
    -> FROM (
    ->   SELECT
    ->     event_editingSessionId,
    ->     COUNT(*) AS init_events
    ->   FROM Edit_11448630
    ->   WHERE
    ->     timestamp BETWEEN "20150401" AND "20150402" AND
    ->     event_editingSessionId IN (
    ->       SELECT
    ->         event_editingSessionId
    ->       FROM Edit_11448630
    ->       WHERE
    ->         timestamp BETWEEN "20150401" AND "20150402" AND
    ->         event_action = "saveSuccess"
    ->       GROUP BY 1
    ->       HAVING COUNT(DISTINCT `event_page.revid`) > 1
    ->     ) AND
    ->     event_action = "init"
    ->   GROUP BY 1
    -> ) AS foo
    -> GROUP BY 1;
+-------------+----------+
| init_events | COUNT(*) |
+-------------+----------+
|           1 |      623 |
+-------------+----------+
1 row in set (1 min 40.80 sec)

It does! --Halfak (WMF) (talk) 17:03, 13 April 2015 (UTC)

Abort type[edit]

According to User:Dandreescu, the action.abort.type is always null for Wikitext. Let's just check our example user's flow to see if we can catch that editConflict.

> SELECT
    ->   event_action,
    ->   timestamp,
    ->   `event_page.revid`,
    ->   `event_page.id`,
    ->   `event_user.id`,
    ->   `event_action.abort.type`,
    ->   `event_action.saveFailure.type`
    -> FROM Edit_11448630
    -> WHERE
    ->   timestamp BETWEEN "20150401" AND "20150402" AND
    ->   event_editingSessionId = "004132dfc66adbd0421e19c118c2b5c5"
    -> ORDER BY id;
+--------------+----------------+------------------+---------------+---------------+-------------------------+-------------------------------+
| event_action | timestamp      | event_page.revid | event_page.id | event_user.id | event_action.abort.type | event_action.saveFailure.type |
+--------------+----------------+------------------+---------------+---------------+-------------------------+-------------------------------+
| init         | 20150401091411 |        654465540 |      42906423 |      <snip>   | NULL                    | NULL                          |
| ready        | 20150401091418 |                0 |      42906423 |      <snip>   | NULL                    | NULL                          |
| saveAttempt  | 20150401092140 |        654465540 |      42906423 |      <snip>   | NULL                    | NULL                          |
| saveSuccess  | 20150401092140 |        654468401 |      42906423 |      <snip>   | NULL                    | NULL                          |
| saveFailure  | 20150401092156 |        654468401 |      42906423 |      <snip>   | NULL                    | editConflict                  |
| saveAttempt  | 20150401092156 |        654468401 |      42906423 |      <snip>   | NULL                    | NULL                          |
| ready        | 20150401092211 |                0 |      42906423 |      <snip>   | NULL                    | NULL                          |
| saveSuccess  | 20150401092356 |        654468588 |      42906423 |      <snip>   | NULL                    | NULL                          |
| saveAttempt  | 20150401092356 |        654468401 |      42906423 |      <snip>   | NULL                    | NULL                          |
+--------------+----------------+------------------+---------------+---------------+-------------------------+-------------------------------+
9 rows in set (1 min 2.26 sec)
> SELECT DISTINCT event_editor, `event_action.abort.type` FROM Edit_11448630 WHERE timestamp BETWEEN "20150401" AND "20150402";
+--------------+-------------------------+
| event_editor | event_action.abort.type |
+--------------+-------------------------+
| wikitext     | NULL                    |
| visualeditor | nochange                |
| visualeditor | abandon                 |
| visualeditor | NULL                    |
| visualeditor | switchwithout           |
| visualeditor | preinit                 |
| visualeditor | switchwith              |
| visualeditor | abandonMidsave          |
+--------------+-------------------------+
8 rows in set (1 min 1.64 sec)

Sure enough, we get nothing from that field. --Halfak (WMF) (talk) 19:36, 13 April 2015 (UTC)