Page MenuHomePhabricator

[Bug] Not all the apps sent snapshot to MobileWikiAppiOSUserHistory
Closed, DeclinedPublic

Description

When opted in users start the app for the first time after install/upgrade, the app should send a 'session_start' event to the MobileWikiAppiOSSessions table, and take a snapshot of the user configuration and send it to the MobileWikiAppiOSUserHistory table at the same time. However, in 5.8.2.1421, there are 324793 unique app IDs in MobileWikiAppiOSSessions table, but only 194487 unique app IDs in MobileWikiAppiOSUserHistory table. About 40% of apps didn't send their snapshots!

After some investigation, there are 2 issues may be related to this bug:

1, Events are not being queued over multiple sessions. Currently, it seems the events are only queued for the last session, but not older sessions.

Steps to reproduce:

  • Clean install 5.8.2.1421
  • Set up Charles proxy to allow throttling. In throttle settings, change the bandwidth to 0kbps
  • Start the app for the first time, opt in to send usage report. Of course, we can't see any feed other than the education cards
  • Take the app to the background to end this session. Then, turn on the app to start a 2nd session, and turn off again.
  • Stop throttling
  • Take the app to the foreground again to start the 3rd session. From Charles proxy, we only see the queued 'session_end' events from last session, but no snapshots and other events occured during the first session.

2, Users from target countries are not being identified correctly.

After breaking down the tables by countries, we found that out of the users who sent eventlogging to other tables but not sent snapshots, 17.6% are Germany, 9% are Italy, 8% are France, 6.4% are Japan, 4% are Spain, 4% are Russia, 3.7% are Netherlands, 3.6% are Switzerland, 3.4% are US, 2.7% are Sweden, etc. Because this distribution of the problematic users is not proportional to our user population (we have ~30% user from US, 8.5% from Germany, 7% from UK...), this doesn't seem random and may have something to do with our target countries identification.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJun 11 2018, 6:26 PM
chelsyx updated the task description. (Show Details)Jun 11 2018, 6:44 PM
JMinor triaged this task as Low priority.Jun 25 2018, 9:28 PM
Vvjjkkii renamed this task from [Bug] Not all the apps sent snapshot to MobileWikiAppiOSUserHistory to y8aaaaaaaa.Jul 1 2018, 1:04 AM
Vvjjkkii removed chelsyx as the assignee of this task.
Vvjjkkii raised the priority of this task from Low to High.
Vvjjkkii updated the task description. (Show Details)
Vvjjkkii removed a subscriber: Aklapper.
CommunityTechBot renamed this task from y8aaaaaaaa to [Bug] Not all the apps sent snapshot to MobileWikiAppiOSUserHistory.Jul 2 2018, 2:11 PM
CommunityTechBot assigned this task to chelsyx.
CommunityTechBot lowered the priority of this task from High to Low.
CommunityTechBot updated the task description. (Show Details)
CommunityTechBot added a subscriber: Aklapper.
chelsyx updated the task description. (Show Details)Jul 24 2018, 6:06 PM
chelsyx updated the task description. (Show Details)Jul 24 2018, 7:08 PM
JMinor added a subscriber: JMinor.Jul 27 2018, 6:02 PM

Per our 1:1, let's split out the location discussion into a separate sub-task so we can converge on the best way to handle localization identification consistently.

chelsyx closed this task as Declined.Jun 21 2019, 3:24 AM

I checked the number again for version 6.2.3.1612. I found 250202 unique app install ID in the MobileWikiAppiOSUserHistory table and 264004 IDs in the MobileWikiAppiOSSessions table, which means the difference is only around 5%. So I'm closing this ticket as the difference is small enough to ignore.

Query:

-- MobileWikiAppiOSUserHistory table, the result is 250202
select count(distinct event.app_install_id) as n_users
from mobilewikiappiosuserhistory
where year=2019 and month > 4
and useragent.wmf_app_version = "6.2.3.1612"
and useragent.os_family = "iOS"

-- MobileWikiAppiOSSessions table, the result is 264004
select count(distinct event.app_install_id) as n_users
from mobilewikiappiossessions
where year=2019 and month > 4
and useragent.wmf_app_version = "6.2.3.1612"
and useragent.os_family = "iOS"