Page MenuHomePhabricator
Paste P20628

T300164 Test: Data pageview error by country 2021-12-01
ActivePublic

Authored by AndyRussG on Feb 14 2022, 4:01 AM.
Tags
None
Referenced Files
F34950851: T300164 Test: Data loss by country 2021-12-01
Feb 14 2022, 4:03 AM
F34950846: T300164 Test: Data loss by country 2021-12-01
Feb 14 2022, 4:01 AM
Subscribers
None
WITH country_dc AS (
SELECT
count( * ) AS reported,
split(hostname, '.')[2] AS datacenter,
geocoded_data[ 'country_code' ] AS country_code
FROM
wmf.webrequest
WHERE
webrequest_source = 'text'
AND year = 2021
AND month = 12
AND day = 1
GROUP BY
split(hostname, '.')[2],
geocoded_data[ 'country_code' ] ),
country_dc_corrected AS (
SELECT
country_code,
datacenter,
reported AS country_dc_reported,
CASE
-- On this day, 7 hosts responding and 1 losing data at equiad
WHEN datacenter = 'eqiad' THEN reported * 8/7
-- On this day, 6 hosts responding and 2 losing data at ulsfo
WHEN datacenter = 'ulsfo' THEN reported * 8/6
ELSE reported
END
AS country_dc_corrected
FROM country_dc )
SELECT
SUM( country_dc_reported ) AS reported,
SUM( country_dc_corrected ) AS corrected,
country_code
FROM
country_dc_corrected
GROUP BY
country_code;

Event Timeline

AndyRussG changed the title of this paste from T300164 Test: Data loss by country 2021-12-01 to T300164 Test: Data pageview error by country 2021-12-01.Feb 14 2022, 4:13 AM