Closed Bug 1572744 Opened 6 years ago Closed 6 years ago

Add schema for Sync pings

Categories

(Data Platform and Tools :: General, task, P2)

task
Points:
2

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: akomar, Assigned: mreid)

References

Details

Attachments

(1 file)

I've been working on this as I get time, and will continue to do so. If this becomes urgent or starts to block other work, please let me know.

Assignee: nobody → mreid
Points: --- → 2
Priority: -- → P2
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED

We may also need a schema for v5 of Sync ping.

Sync ETL that's currently running uses both v4 and v5 of the ping.

:loines, :linacambridge - I see only v4 of the ping documented, but clearly some clients (dev?) are sending v5 and it's being used for analyses.
Are schemas the same across these versions?

Status: RESOLVED → REOPENED
Flags: needinfo?(loines)
Flags: needinfo?(lina)
Resolution: FIXED → ---

I think so—per bug 1410145, v5 was used in older versions of Android (and is unchanged from v4)...but that bug was fixed in 2017! https://github.com/mozilla-services/mozilla-pipeline-schemas/pull/422 tracks removing the schema as well.

Flags: needinfo?(loines)
Flags: needinfo?(lina)

:lina and :loines, what do you think is the right thing to do with this v5 data? We have the following options:

  1. Keep the v5 data as-is. Data will continue to flow in from clients using the affected Fennec versions*. This will mean the next schema-incompatible sync ping version would be v6.
  2. Drop the v5 data now and going forward. This will mean we could use v5 for the next schema-incompatible change on the client.

In the underlying implementation, we'll be dealing with a special case either way. Option 1 implies a special case to consider the unqualified telemetry.sync table as v4 rather than using the default of "the highest available version". Option 2 means we'll have to manually delete previously collected data and drop the corresponding tables. With Option 2, if we want to use the v5 table again in the future, we will be mixing those records with the ones from old versions.

I slightly prefer option 2, but I'm not sure about the implications for data analysis.

* Here are the per-version submission counts of v5 pings since Sept. 1st:

app_version,row_count
55.0.2,113840
57.0.1,109424
56.0,75893
57.0.4,55165
57.0,49707
55.0,6421
56.0a1,302
57.0a1,258
58.0a1,191
57.0.3,8
Flags: needinfo?(loines)
Flags: needinfo?(lina)

let me take a look at how many users that is and get back to you

Hmmm, those versions are 2+ years old...I don’t think we’d be able to act on the data (like failure reasons and success rates) even if we kept collecting it. Leif, how do you feel about dropping it?

https://sql.telemetry.mozilla.org/queries/65209/source#166003

So it looks like we would be deleting/not logging data for 5-6k fennec users per day if we go with option 2. The number of users on these versions has been going down steadily. As of today, dropping/ignoring data from those clients would lead to drop of 0.5% of our measure of the number of sync clients on fennec per day. That is not whopping, but it is also not trivial.

I believe there will also be another change to the sync ping soon. It may be schema-incompatible see https://bugzilla.mozilla.org/show_bug.cgi?id=1582263.

Does that change the calculus here? Would it tip the balance more toward 2? If so, then I think I'm OK with it.

Flags: needinfo?(loines)

Adding "devices" at the top level of the payload would be compatible as long as we don't need to prevent the "devices" field from being present inside the "syncs" field too.

If we do need to prevent that case, it would be incompatible and I'd say we should increment both desktop and mobile to v6 and move on (ie. it tips the balance towards option 1). This has the complication that changing the version on desktop away from v4 is tricky.

If not, and we can tolerate looking in two places in one table for the device info, we can stick with v4 and I continue to prefer option 2.

To sum up:

  • v5 is lingering on for ~2 years
  • dropping v5 is not trivial from the point of view of KPIs
  • we'll likely have another schema change in near future which will probably force us to create a view unioning at least v4 and v6

I suggest, just in context of having proper schemas for the versions currently in use, that we:

  • keep v5 and set it up with the same schema as v4
  • change telemetry.sync to be a view unioning v4 and v5 so it can be used instead of legacy Sync datasets
Flags: needinfo?(mreid)
Flags: needinfo?(loines)

That sounds good to me. I also filed Bug 1587844 as one possible way to make it easier to version the sync ping in Fx Desktop.

Flags: needinfo?(mreid)

V5 schema has been set up. telemetry.sync is now pointing to sync_v4 as that should be used by default.
For more sensitive analyses (like the one mentioned in Comment 7), unioning v5 should be considered (see example query).

Status: REOPENED → RESOLVED
Closed: 6 years ago6 years ago
Resolution: --- → FIXED
See Also: → 1638899
See Also: → 1663573
Flags: needinfo?(loines)
Flags: needinfo?(lina)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: