Page MenuHomePhabricator

event_sanitized.serversideaccountcreation reports users that actually don't exist
Open, Needs TriagePublic

Description

While working with event_sanitized.serversideaccouncreation data, I found many "fantom users" reported (users that are in SSAC, but not in mediawiki_user). Here is an example:

Spark query:

SELECT
    *
FROM event_sanitized.serversideaccountcreation
WHERE
        year = 2023
    AND month = 3
    AND day = 28
    AND wiki = 'enwiki'
    AND event.isSelfMade == true
    AND event.userId = 45645424

Output (WMF-NDA paste):

{P94154}

Specifically, it reports the user's name to be PeterPanlikesmen, created at en.wiki.

However, all of the following SQL queries against enwiki database return zero rows:

  • SELECT user_id, user_name FROM user WHERE user_id = 45645424
  • SELECT user_id, user_name FROM user WHERE user_name = "PeterPanlikesmen"
  • SELECT * FROM logging WHERE log_namespace = 2 AND log_title = "PeterPanlikesmen"

SELECT gu_id, gu_name FROM globaluser WHERE gu_name='PeterPanlikesmen' against centralauth also yields zero results.

I tried to see how widespread this is, and I run the following query:

SELECT
    ssac.dt,
    ssac.event.userId,
    ssac.event.userName,
    ssac.event.isSelfMade,
    rmu.user_id AS mw_uid
FROM event_sanitized.serversideaccountcreation ssac
LEFT JOIN wmf_raw.mediawiki_user rmu ON (
    (rmu.snapshot = '2026-05')
    AND (rmu.wiki_db = ssac.wiki)
    AND (rmu.user_id = ssac.event.userId)
)
WHERE
    (
        -- between January 2021 and February 2025
           (year >= 2021 AND year < 2025)
        OR (year = 2025 AND month < 3)
    )
    AND ssac.wiki = 'enwiki'
    AND ssac.event.isSelfMade == true

On this, dfUsers[['is_joinable', 'dt']].groupby('is_joinable').count() returns:

  • False: 6914
  • True: 4975864

Meaning we have ~7k of fantom users in this data period.

Event Timeline

I'm not sure, but is this a duplicate of T429061: Inconsistent counts of global account registrations in analytics datasets? In that, it turned out the comparison was just incorrect?

Also, FYI, another data point for you would be the almost ready to release new event.mediawiki_user_change_dev0 event table created as part of T423952: Create mediawiki.user_change event stream.

I'm not sure, but is this a duplicate of T429061: Inconsistent counts of global account registrations in analytics datasets? In that, it turned out the comparison was just incorrect?

I don't think so? This is about SSAC reporting more accounts than what was actually created, while that task was saying it returns less accounts. Also, that task didn't really resolve the SSAC discrepancy (task author said it isn't important to them).

I'm fairly certain event.userId is supposed to match user.user_id on that wiki, given how it is constructed in MW code. But, if I'm making an error in my queries, I'm of course happy to be corrected too.

Got it.

Welp, I'm not really sure who to report this to. Is there an owner of this legacy ServerSideAccountCreation instrumentation? It is emitted by the Campaigns extension, so maybe um, FR-Tech-Analytics ?

CC also @nshahquinn-wmf ?