I'm doing some stats for Flock about Atomic Desktops and I've noticed that we have a lot of entries in the count me database with a sys_age of -1, which makes no sense to me as nothing should be reporting that (sys_age is supposed to go from 1 to 4 https://dnf.readthedocs.io/en/latest/conf_ref.html#countme-label).
Do folks have any idea where that could come from? Note that it's not just Atomic Desktops reporting -1 but other Fedora/CentOS etc. variants as well.
The code is likely at https://github.com/fedora-infra/mirrors-countme.
Example chart:
<img alt="chart_2.png" src="/fedora-infrastructure/issue/raw/files/a74b558679af704f8096bebcc46f164c8779d83dcfe08d1b215a60f07671f5d2-chart_2.png" />
Query:
SELECT date(julianday('1970-01-05')+weeknum*7 + 6) AS date, weeknum, SUM(minus_hits), SUM(one_hits), SUM(positive_hits) FROM ( SELECT weeknum, SUM(hits) AS minus_hits, 0 AS one_hits, 0 AS positive_hits FROM countme_totals WHERE ((os_variant IS 'silverblue') OR (os_variant IS 'kinoite') OR (os_variant IS 'sericea') OR (os_variant IS 'sway-atomic') OR (os_variant IS 'onyx') OR (os_variant IS 'budgie-atomic') OR (os_variant IS 'cosmic-atomic')) AND repo_tag REGEXP 'updates-released-f[3-4][0-9]' AND sys_age < 0 GROUP BY weeknum UNION SELECT weeknum, 0 AS minus_hits, SUM(hits) AS one_hits, 0 AS positive_hits FROM countme_totals WHERE ((os_variant IS 'silverblue') OR (os_variant IS 'kinoite') OR (os_variant IS 'sericea') OR (os_variant IS 'sway-atomic') OR (os_variant IS 'onyx') OR (os_variant IS 'budgie-atomic') OR (os_variant IS 'cosmic-atomic')) AND repo_tag REGEXP 'updates-released-f[3-4][0-9]' AND sys_age = 1 GROUP BY weeknum UNION SELECT weeknum, 0 AS minus_hits, 0 AS one_hits, SUM(hits) AS positive_hits FROM countme_totals WHERE ((os_variant IS 'silverblue') OR (os_variant IS 'kinoite') OR (os_variant IS 'sericea') OR (os_variant IS 'sway-atomic') OR (os_variant IS 'onyx') OR (os_variant IS 'budgie-atomic') OR (os_variant IS 'cosmic-atomic')) AND repo_tag REGEXP 'updates-released-f[3-4][0-9]' AND sys_age > 0 GROUP BY weeknum ) WHERE date > '2021-05-01' GROUP BY weeknum
Charted with https://sqliteviz.com/.
I haven't looked at either the client or the code to write this in a long time. However I remember something about us originally doing 0 for new clients showing up the first time. Maybe that wasn't a clean show and it was changed to -1 to show that this was seen as a 'new' for some reason.
@mattdm is going ot have a better idea of where the code went over time
Link to discussion start in the infra room: https://matrix.to/#/!JMiyDwIilrGoiSmkqy:matrix.org/$PcMqqKt59kf6N_yvskhfDPFgYzVL0Fg7BK6TtFDsVvU?via=fedora.im&via=matrix.org&via=fedoraproject.org
From Carl George:
Carl George: the database with -1 entries is the countme data merged with the unique ip data so actual countme data has the 1-4 bucket, and -1 means it's from mirror unique ips travier: Thanks, so if I count both I'm double counting, right? And it's kind of expected that it follows the sys_age>1 count then Carl George: right. i think if you get the right db file it just won't have those -1 entries at all.
Carl George: the database with -1 entries is the countme data merged with the unique ip data so actual countme data has the 1-4 bucket, and -1 means it's from mirror unique ips
travier: Thanks, so if I count both I'm double counting, right? And it's kind of expected that it follows the sys_age>1 count then
Carl George: right. i think if you get the right db file it just won't have those -1 entries at all.
Metadata Update from @siosm: - Issue close_status updated to: Fixed with Explanation - Issue status updated to: Closed (was: Open)
Log in to comment on this ticket.