Page MenuHomePhabricator

Perform a one-time clean up of retained data sets in event_sanitize
Closed, ResolvedPublic

Description

From https://wikitech.wikimedia.org/wiki/Data_Platform/Event_Sanitization:

In order to retain event data in the Data Lake beyond the standard 90-day period set out in the Privacy Policy and Data Retention Guidelines, it must be sanitized

We keep these events under the event_sanitized schema.

We have been discussing whether this mechanism is worth keeping around (slack thread questioning need, slack thread of event_sanitized users and use cases, meeting notes). However, this task is not about decommissioning the system. Rather, the biggest bang for the buck right now is to perform a one-time clean up of retained data sets, considering that these datasets account for an outsize file count that puts pressure in our HDFS namenode (34.1M files vs 124M total = ~28%).

Top offenders HDFS listing of files associated to all event_sanitized datasets (full listing at P88850):

# num-files hdfs-path
$ hdfs dfs -count /wmf/data/event_sanitized/* | awk '{print $2, $4}' | sort --numeric-sort --reverse
4792271 /wmf/data/event_sanitized/netflow
2213551 /wmf/data/event_sanitized/searchsatisfaction
1009049 /wmf/data/event_sanitized/mediawiki_revision_score
826904 /wmf/data/event_sanitized/mobilewebuiactionstracking
695296 /wmf/data/event_sanitized/editattemptstep
605828 /wmf/data/event_sanitized/referencepreviewspopups
593696 /wmf/data/event_sanitized/mediawiki_page_links_change
570475 /wmf/data/event_sanitized/mobilewikiapplinkpreview
556549 /wmf/data/event_sanitized/mediawiki_revision_create
490358 /wmf/data/event_sanitized/mobilewikiappsessions
...

Top offenders HDFS listing of total size associated to all event_sanitized datasets (full listing at P88851):

# bytes gigabytes hdfs-path
$ hdfs dfs -count /wmf/data/event_sanitized/* | awk '{print $3, $3/(1024^3), $4}' | sort --numeric-sort --reverse
10653068734190 9921.44 /wmf/data/event_sanitized/netflow
6899662519641 6425.81 /wmf/data/event_sanitized/searchsatisfaction
2554462025290 2379.03 /wmf/data/event_sanitized/mobilewikiappsessions
1892463163801 1762.49 /wmf/data/event_sanitized/mobilewikiapplinkpreview
1856562350002 1729.06 /wmf/data/event_sanitized/readingdepth
1610807573809 1500.18 /wmf/data/event_sanitized/mediawiki_page_links_change
1276622759761 1188.95 /wmf/data/event_sanitized/mediawiki_revision_create
670818055482 624.748 /wmf/data/event_sanitized/mediawiki_revision_score
654801033262 609.831 /wmf/data/event_sanitized/editattemptstep
605972171689 564.356 /wmf/data/event_sanitized/mediawiki_revision_tags_change
...

Cleanup tracking

Orphaned datasets (removed from allowlist, HDFS data never deleted)

Dataset(s)FilesSizeHDFSHiveNotes
mobilewikiapp* (36 schemas)~7.7M~4.4 TBDone. Ref: T360579
mediaviewer, multimediaviewer* (5 paths)~505K~55 GBRef: T310890
externalguidance121,91731.6 GBRef: T303508
changeslistfilters, changeslistfiltergrouping242,24026.7 GBRef: T317525
echointeraction, echomail459,6326.7 GBRef: T344167
twocolconflictconflict, twocolconflictexit353,6142.4 GBRef: T397611
editoractivation214,3601.1 GBRef: T330766
mediawiki_wikistories_consumption_event, mediawiki_wikistories_contribution_event341,0670.5 GBRef: T408178
flowreplies101,3540.3 GBRef: T309025
guidedtourinternallinkactivation7,254~0 GBRef: T288416

Still in allowlist — delete data + remove allowlist entry

Dataset(s)FilesSizeHDFSHiveAllowlistNotes
readingdepth~388K~1,729 GBLast write year=2022. Superseded by mediawiki_reading_depth (EP, active)
mobilewebuiactionstracking~827K~300 GBLast write Oct 2024. Coordinated deprecation with desktop sibling
desktopwebuiactionstracking~450K~172 GBSame as above.
mediawiki_revision_score~1M~624.8 GBMain allowlist only. Last write 2023. Confirmed by @Ottomata (T273789).
searchsatisfaction~2.3M~6,426 GBConfirmed safe to delete by @EBernhardson, @dcausse, @MNeisler.

Active — needs retention policy discussion

Dataset(s)FilesSizeNotes
netflow~4.8M~9,921 GBActively written. No retention limit set. ~3.5 TB pre-2023 could be trimmed. Decided to tackle this separately in T424904.

Anomalies — investigate separately

Dataset(s)Notes
referencepreviewspopupsStream appeared dead in 2026 (878 rows YTD vs ~4B in 2025). @awight confirmed: data still needed — do not delete this round. WMDE will restore or reimplement the stream.

This task's investigation was AI assisted. Here is a summary of the work as an example of a good use case to pay technical debt: P90342

Related Objects

Mentioned In
T424904: Set up a rolling retention window for event_sanitized.netflow
T423920: Streaming HTML & Edit Types - productionization checklist
T317942: Drop event.changeslistfiltergrouping table
T304714: Drop sanitized ExternalGuidance data
T311229: Drop MediaViewer and MultimediaViewer* tables
Mentioned Here
T424904: Set up a rolling retention window for event_sanitized.netflow
P91991 DROPs for event_sanitized.searchsatisfaction
T273789: Sanitize and ingest all event tables into the event_sanitized database
P91813 Drops for event_sanitized.mediawiki_revision_score
P91812 DROPs for readingdepth, mobilewebuiactionstracking and desktopwebuiactionstracking
T423920: Streaming HTML & Edit Types - productionization checklist
T193176: [EL sanitization] Productionize EventLoggingSanitization.scala
T234563: Whitelist MobileWebUIActionsTracking data stream
T263143: Add DesktopWebUIActionsTracking fields to the allowlist
P91293 orphaned_hdfs_rm.sh
P91294 orphaned_drop_partitions.hql
P91295 orphaned_drop_tables.hql
P91234 event_sanitized.mobilewikiapp* DROPs
T304714: Drop sanitized ExternalGuidance data
T311229: Drop MediaViewer and MultimediaViewer* tables
T317942: Drop event.changeslistfiltergrouping table
P90374 DROP TABLEs for mobilewikiapp*
P90375 hdfs dfs -rms for mobilewikiapp*
P90342 Paying technical debt with AI: an event_sanitized cleanup case study
T231339: Set up automatic deletion/snitization for netflow data set in Hive
T274607: Add SearchSatisfaction to the allowlist
T303508: Decommission the ExternalGuidance instrument
T309025: Decommission the FlowReplies instrument
T310890: Decommission the MediaViewer and MultimediaViewer* instruments
T317525: Decommission the ChangesListFilterGrouping instrument
T330766: Decommission the EditorActivation instrument
T344167: Decommission the EchoMail and EchoInteraction instruments
T360579: Clean up old MobileWikiApp schemas from allowlist.yaml
T397611: Decommission the TwoColConflictConflict and -Exit instruments
T408178: Decommission the Wikistories instruments
P88850 HDFS listing of files associated to all event_sanitized datasets
P88851 HDFS listing of total size associated to all event_sanitized datasets

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes
xcollazo changed the task status from Open to In Progress.Apr 8 2026, 12:57 PM
xcollazo claimed this task.
xcollazo triaged this task as Medium priority.

Investigation findings

We investigated two angles: the top offenders by file count and size (from the ticket description), and all schemas previously removed from the sanitization allowlist (identified via git log). This is not an exhaustive scan of the full namespace — there may be additional datasets worth reviewing. Findings are grouped by suggested action.


1. Orphaned datasets — suggest deleting

These schemas were removed from the sanitization allowlist in prior tasks but their HDFS data was never deleted. No further stakeholder input appears to be needed, as the decision to deprecate each one is already documented in the referenced tasks.

From T360579 (MobileWikiApp schemas, allowlist cleaned up Jun 2024):

36 schemas under /wmf/data/event_sanitized/mobilewikiapp* — all confirmed present on HDFS.

Path (glob)FilesSize
mobilewikiapp* (36 schemas)~7.7M~4,400 GB

From other prior cleanup tasks:

Dataset(s)FilesSizeOriginal task
mediaviewer, multimediaviewer* (5 paths)~505K~55 GBT310890
externalguidance121,91731.6 GBT303508
changeslistfilters, changeslistfiltergrouping242,24026.7 GBT317525
echointeraction, echomail459,6326.7 GBT344167
twocolconflictconflict, twocolconflictexit353,6142.4 GBT397611
editoractivation214,3601.1 GBT330766
mediawiki_wikistories_consumption_event, mediawiki_wikistories_contribution_event341,0670.5 GBT408178
flowreplies101,3540.3 GBT309025
guidedtourinternallinkactivation7,254~0 GBT288416

Subtotal orphans: ~9.7M files, ~4,524 GB (~4.4 TB)


2. Delete data + remove from allowlist

These schemas are still listed in the allowlist but appear to no longer be written to. We suggest deleting the data and removing the allowlist entries.

DatasetLast writeFilesSizeNotes
readingdepth (ReadingDepth in allowlist)year=2022~388K~1,729 GBAppears fully superseded by mediawiki_reading_depth EP stream (confirmed active as of Jan 2026). Nearly all data (1.7 TB, ~358K files) is from 2018–2019.
mobilewebuiactionstracking (MobileWebUIActionsTracking in allowlist)year=2024 (Oct)~827K~300 GBStopped writing simultaneously with desktopwebuiactionstracking — likely an intentional coordinated deprecation. No EP successor found.
desktopwebuiactionstracking (DesktopWebUIActionsTracking in allowlist)year=2024 (Oct)~450K~172 GBSame as above.

Subtotal: ~1.7M files, ~2,200 GB


3. Needs stakeholder discussion — retention policy

These schemas are actively written to but accumulating data well beyond what most use cases likely require.

netflow — ~4.8M files, 9,921 GB total, actively written:

YearFilesSize
202035,792371 GB
2021288,4121,587 GB
2022671,9131,566 GB
2023790,0491,653 GB
20241,322,9852,051 GB
20251,484,4012,358 GB
2026399,417678 GB (partial)

File count is growing ~2x every 2 years. When this was set up (T231339), the decision was to sanitize and retain indefinitely — but no retention limit was established. Even a 3-year rolling window could free ~996K files and ~3.5 TB (2020–2022). It may be worth revisiting this with the original owner (@mforns).

searchsatisfaction — ~2.3M files, 6,426 GB total, actively written, data goes back to 2021. Retention was explicitly requested in T274607 for analytics use. A long-term retention policy may be worth establishing — suggested contacts are @MNeisler (requester) and @mforns (owner).


4. Anomalies worth investigating separately

  • referencepreviewspopups: year=2026 partition has 6,986 files but only 0.01 GB of data — near-empty files being written. Possibly a pipeline issue or a quiet deprecation.
  • mediawiki_revision_score: 2024–2026 has ~59K files but only 0.09 GB total (near-empty). Also has an anomalous spike in 2019 (486K files vs ~25–74K for all other years). Something may be broken in the ingestion pipeline.

5. Hive tables

All event_sanitized datasets have associated Hive tables in the event_sanitized database. For each dataset we delete, we should also plan for:

  • DROP TABLE event_sanitized.<schema> for fully removed schemas
  • DROP PARTITION for schemas where we only trim older years (e.g. netflow if we agree on a rolling window)

This should be coordinated to avoid leaving stale table metadata after the HDFS data is gone.


Summary

CategoryFilesSize
Orphaned datasets (suggest deleting)~9.7M~4,524 GB
Delete + remove from allowlist~1.7M~2,200 GB
Total suggested immediate deletions~11.4M~6,724 GB
Needs retention discussion (netflow + searchsatisfaction)~7.1M~16,347 GB

The suggested immediate deletions represent ~33% of the current total file count (~11.4M of ~34.1M files), which would meaningfully reduce namenode pressure.

I'd be totally in favor of setting a long-time retention period for event_sanitized.
The overall plan looks great to me!

@SNowick_WMF and @phuedx:

You both seem to be the owners of the original work items that decommissioned some event_sanitizied datasets.

Some data was left behind. I would like to move forward with removing all that data. Thus want to double check with you both that we are good and that you do not need this data?:

...

1. Orphaned datasets — suggest deleting

These schemas were removed from the sanitization allowlist in prior tasks but their HDFS data was never deleted. No further stakeholder input appears to be needed, as the decision to deprecate each one is already documented in the referenced tasks.

From T360579 (MobileWikiApp schemas, allowlist cleaned up Jun 2024):

36 schemas under /wmf/data/event_sanitized/mobilewikiapp* — all confirmed present on HDFS.

Path (glob)FilesSize
mobilewikiapp* (36 schemas)~7.7M~4,400 GB

From other prior cleanup tasks:

Dataset(s)FilesSizeOriginal task
mediaviewer, multimediaviewer* (5 paths)~505K~55 GBT310890
externalguidance121,91731.6 GBT303508
changeslistfilters, changeslistfiltergrouping242,24026.7 GBT317525
echointeraction, echomail459,6326.7 GBT344167
twocolconflictconflict, twocolconflictexit353,6142.4 GBT397611
editoractivation214,3601.1 GBT330766
mediawiki_wikistories_consumption_event, mediawiki_wikistories_contribution_event341,0670.5 GBT408178
flowreplies101,3540.3 GBT309025
guidedtourinternallinkactivation7,254~0 GBT288416

Subtotal orphans: ~9.7M files, ~4,524 GB (~4.4 TB)

...

Confirming we aren't using the data in any of the /wmf/data/event_sanitized/mobilewikiapp* schemas, signing off on data deletion.

As @xcollazo specified: no new data is being written to event_sanitized from the MobileWikiApp* schemas since Jun 2024. This is just pre-existing data that we suspect no one is using.

From T360579 (MobileWikiApp schemas, allowlist cleaned up Jun 2024):

36 schemas under /wmf/data/event_sanitized/mobilewikiapp* — all confirmed present on HDFS.

Path (glob) Files Size
mobilewikiapp* (36 schemas) ~7.7M ~4,400 GB

Confirming we aren't using the data in any of the /wmf/data/event_sanitized/mobilewikiapp* schemas, signing off on data deletion.

Thanks @SNowick_WMF.

Its Friday, so I will refrain from deleting data today. Sometime next week we will go ahead and apply DROP TABLEs (P90374) and hdfs dfs -rm -r (P90375) for all of these mobilewikiapp* assets.

Re. the tables in the "From other prior cleanup tasks" table:

General

IIRC I tidied those instruments up about 4 years ago, including removing sanitization rules, i.e. those tables have been written to in years. If someone were using the data in those tables, then it would be woefully out of date.

When you delete these tables, could you please also delete their counterparts in the event database. There are a couple of tasks about removing these tables that never seem to be prioritized:

Specific

TableNote
externalguidanceNeil confirmed that the sanitized data could be deleted in T303508#7806778
editoractivationNo one is/was aware of anyone using that data, which I noted at the time in T330766#8655569
echointeraction, echomailThese were superseded by an EP stream so I'm confident that the olde data can be removed

@xcollazo

searchsatisfaction — ~2.3M files, 6,426 GB total, actively written, data goes back to 2021. Retention was explicitly requested in T274607 for analytics use. A long-term retention policy may be worth establishing

I no longer work regularly with this dataset. From the product analytics side, I believe it would be fine to delete some of the older data; however, I'd recommend checking with the Search Platform team to confirm. Maybe @EBernhardson or @dcausse?

@xcollazo

searchsatisfaction — ~2.3M files, 6,426 GB total, actively written, data goes back to 2021. Retention was explicitly requested in T274607 for analytics use. A long-term retention policy may be worth establishing

I no longer work regularly with this dataset. From the product analytics side, I believe it would be fine to delete some of the older data; however, I'd recommend checking with the Search Platform team to confirm. Maybe @EBernhardson or @dcausse?

Thanks for the ping, personally I do not use the searchsatisfaction table from the event_sanitized database and I'd fine dropping/cleaning it up unless @EBernhardson needs it.

I don't believe I've used the event_santized tables either. We do use some of the data beyond 90 days, but that's in a separate rollup table. It should be safe, afaik, to drop searchsatisfaction from the event_sanitized database.

Confirming we aren't using the data in any of the /wmf/data/event_sanitized/mobilewikiapp* schemas, signing off on data deletion.

Thanks @SNowick_WMF.

Its Friday, so I will refrain from deleting data today. Sometime next week we will go ahead and apply DROP TABLEs (P90374) and hdfs dfs -rm -r (P90375) for all of these mobilewikiapp* assets.

Attempted to run the DROP TABLEs from P90374, but all 36 tables timed out — each has 56K+ partitions and the metastore cannot handle dropping them all in a single transaction.

Workaround: Drop partitions in batches before the final DROP TABLE. Since the tables are partitioned by year/month/day/hour, we are dropping one month at a time per table (36 statements per month-block), then the final DROP TABLE presumably will run instantly with an empty table.

  • Year 2017 succeeded dropping by full year (~984 partitions/table, partial year starting Nov 2017).
  • Year 2018 failed by full year (~8,760 partitions/table), succeeded month-by-month (~730 partitions/table per statement, ~6s each).
  • Years 2019-2024 are currently running month-by-month, ETA a few hours.

Will follow up once partition drops are complete and final DROP TABLEs have been executed.

All these new DROPs documented at P91234.

Confirming we aren't using the data in any of the /wmf/data/event_sanitized/mobilewikiapp* schemas, signing off on data deletion.

Thanks @SNowick_WMF.

Its Friday, so I will refrain from deleting data today. Sometime next week we will go ahead and apply DROP TABLEs (P90374) and hdfs dfs -rm -r (P90375) for all of these mobilewikiapp* assets.

Attempted to run the DROP TABLEs from P90374, but all 36 tables timed out — each has 56K+ partitions and the metastore cannot handle dropping them all in a single transaction.

Workaround: Drop partitions in batches before the final DROP TABLE. Since the tables are partitioned by year/month/day/hour, we are dropping one month at a time per table (36 statements per month-block), then the final DROP TABLE presumably will run instantly with an empty table.

  • Year 2017 succeeded dropping by full year (~984 partitions/table, partial year starting Nov 2017).
  • Year 2018 failed by full year (~8,760 partitions/table), succeeded month-by-month (~730 partitions/table per statement, ~6s each).
  • Years 2019-2024 are currently running month-by-month, ETA a few hours.

Will follow up once partition drops are complete and final DROP TABLEs have been executed.

All these new DROPs documented at P91234.

All DROPs from P91234 successful. All hdfs dfs -rm -r from P90375 successful. 🎉

Now removing all other "Orphaned datasets (removed from allowlist, HDFS data never deleted)" with the following scripts:

P91293: orphaned_hdfs_rm.sh
P91294: orphaned_drop_partitions.hql
P91295: orphaned_drop_tables.hql

Now removing all other "Orphaned datasets (removed from allowlist, HDFS data never deleted)" with the following scripts:

P91293: orphaned_hdfs_rm.sh
P91294: orphaned_drop_partitions.hql
P91295: orphaned_drop_tables.hql

All done. 🎉

...
When you delete these tables, could you please also delete their counterparts in the event database. There are a couple of tasks about removing these tables that never seem to be prioritized:

...

Done.

Moving on to next set:

SchemaFilesSizeLast WriteIntroduced byDateCommitTaskNotes
readingdepth~388K~1,729 GByear=2022@mforns2018-06-2661caff71T193176Superseded by mediawiki_reading_depth (EP, active as of Jan 2026). Remove ReadingDepth from allowlist.
mobilewebuiactionstracking~827K~300 GByear=2024 (Oct)@MNeisler2019-10-0967b471cfT234563Stopped simultaneously with desktop sibling — likely intentional coordinated deprecation. No EP successor in allowlist.
desktopwebuiactionstracking~450K~172 GByear=2024 (Oct)@MNeisler2020-10-045ebe8b41T263143Same as above.

@mforns, @MNeisler, ok if we delete these?

Change #1275982 had a related patch set uploaded (by Xcollazo; author: Xcollazo):

[analytics/refinery@master] Remove DesktopWebUIActionsTracking, MobileWebUIActionsTracking, ReadingDepth from sanitization allowlist

https://gerrit.wikimedia.org/r/1275982

SchemaIn AllowlistLast WriteSizeFilesCommitterTaskNotes
referencepreviewspopupsYes2026 (878 rows)226.8 G610,366@awightT260969Stream appears dead since ~Jan 2026 — 878 rows YTD vs ~4B in 2025 and ~10B in 2024. Needs owner confirmation before any action.
mediawiki_revision_scoreNo (main allowlist only)2023624.8 G1,018,115@OttomataT273789No data written since end of 2023. Not in analytics allowlist. Candidate for deletion pending owner sign-off.

@awight, @Ottomata, ok if we delete these?

Change #1276699 had a related patch set uploaded (by Xcollazo; author: Xcollazo):

[operations/mediawiki-config@master] Remove stream 'mediawiki.dump.revision_content_history.reconcile.rc0'

https://gerrit.wikimedia.org/r/1276699

Change #1276699 merged by jenkins-bot:

[operations/mediawiki-config@master] Remove stream 'mediawiki.dump.revision_content_history.reconcile.rc0'

https://gerrit.wikimedia.org/r/1276699

Mentioned in SAL (#wikimedia-operations) [2026-04-23T19:06:32Z] <otto@deploy1003> Started scap sync-world: Backport for [[gerrit:1276699|Remove stream 'mediawiki.dump.revision_content_history.reconcile.rc0' (T417694)]], [[gerrit:1276397|EventStreamConfig - add rc0 streams for html and feature count change (T423920)]]

Mentioned in SAL (#wikimedia-operations) [2026-04-23T19:14:07Z] <otto@deploy1003> xcollazo, otto: Backport for [[gerrit:1276699|Remove stream 'mediawiki.dump.revision_content_history.reconcile.rc0' (T417694)]], [[gerrit:1276397|EventStreamConfig - add rc0 streams for html and feature count change (T423920)]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Changes can now be verified there.

mediawiki_revision_score

Yes I think we can delete!

Mentioned in SAL (#wikimedia-operations) [2026-04-23T19:28:37Z] <otto@deploy1003> Finished scap sync-world: Backport for [[gerrit:1276699|Remove stream 'mediawiki.dump.revision_content_history.reconcile.rc0' (T417694)]], [[gerrit:1276397|EventStreamConfig - add rc0 streams for html and feature count change (T423920)]] (duration: 22m 05s)

@mforns, @MNeisler, ok if we delete these?

Yes, mobilewebuiactionstracking and desktopwebuiactionstracking can be deleted.

Moving on to next set:

SchemaFilesSizeLast WriteIntroduced byDateCommitTaskNotes
readingdepth~388K~1,729 GByear=2022@mforns2018-06-2661caff71T193176Superseded by mediawiki_reading_depth (EP, active as of Jan 2026). Remove ReadingDepth from allowlist.
mobilewebuiactionstracking~827K~300 GByear=2024 (Oct)@MNeisler2019-10-0967b471cfT234563Stopped simultaneously with desktop sibling — likely intentional coordinated deprecation. No EP successor in allowlist.
desktopwebuiactionstracking~450K~172 GByear=2024 (Oct)@MNeisler2020-10-045ebe8b41T263143Same as above.

@mforns, @MNeisler, ok if we delete these?

DROPs of partitions and tables on P91812.

hdfs dfs -rm -rs are quite short:

#\!/bin/bash
# HDFS deletes for allowlist-removed event_sanitized datasets.
# Safe to run in parallel with partition drops (external tables).

hdfs dfs -rm -r /wmf/data/event_sanitized/readingdepth
hdfs dfs -rm -r /wmf/data/event_sanitized/mobilewebuiactionstracking
hdfs dfs -rm -r /wmf/data/event_sanitized/desktopwebuiactionstracking

All ran successfully.

Change #1275982 merged by Xcollazo:

[analytics/refinery@master] Remove DesktopWebUIActionsTracking, MobileWebUIActionsTracking, ReadingDepth from sanitization allowlist

https://gerrit.wikimedia.org/r/1275982

mediawiki_revision_score

Yes I think we can delete!

DROPs for mediawiki_revision_score at P91813.

And a single hdfs dfs -rm:

hdfs dfs -rm -r /wmf/data/event_sanitized/mediawiki_revision_score

All ran successfully.

Change #1278746 had a related patch set uploaded (by Xcollazo; author: Xcollazo):

[analytics/refinery@master] Remove mediawiki_revision_score from sanitization main allowlist

https://gerrit.wikimedia.org/r/1278746

Please don't delete referencepreviewspopups in this round! We still need the data, although we might be able to clean older history once we figure out exactly what is still relevant.

The dead stream is concerning, I can't remember if we might have done that on purpose or not, but my team will either restore or reimplement soon.

Change #1278746 merged by Xcollazo:

[analytics/refinery@master] Remove mediawiki_revision_score from sanitization main allowlist

https://gerrit.wikimedia.org/r/1278746

@xcollazo

searchsatisfaction — ~2.3M files, 6,426 GB total, actively written, data goes back to 2021. Retention was explicitly requested in T274607 for analytics use. A long-term retention policy may be worth establishing

I no longer work regularly with this dataset. From the product analytics side, I believe it would be fine to delete some of the older data; however, I'd recommend checking with the Search Platform team to confirm. Maybe @EBernhardson or @dcausse?

...
Thanks for the ping, personally I do not use the searchsatisfaction table from the event_sanitized database and I'd fine dropping/cleaning it up unless @EBernhardson needs it.

I don't believe I've used the event_santized tables either. We do use some of the data beyond 90 days, but that's in a separate rollup table. It should be safe, afaik, to drop searchsatisfaction from the event_sanitized database.

Just double checking here:

I think what @dcausse and @EBernhardson are saying is that they are ok with dropping ALL data and removing searchsatisfaction from event_sanitized.

@MNeisler, since you no longer work regularly with this either, would you be ok if I do delete it instead of instituting a rolling window? Or are you saying that even though sporadic, you do still depend on it, and you would rather have the rolling window? If rolling window, what would work for you? 1, 2, 3 years?

@MNeisler, since you no longer work regularly with this either, would you be ok if I do delete it instead of instituting a rolling window?

It's fine by me if you delete it. Thank you for checking @xcollazo

@MNeisler, since you no longer work regularly with this either, would you be ok if I do delete it instead of instituting a rolling window?

It's fine by me if you delete it. Thank you for checking @xcollazo

Got it. For completeness, do note that even though event_sanitized.searchsatisfaction will no longer be accessible, you will continue to have the regular 90d window at the non-sanitized event.searchsatisfaction.

Change #1279483 had a related patch set uploaded (by Xcollazo; author: Xcollazo):

[analytics/refinery@master] Remove SearchSatisfaction from sanitization analytics allowlist

https://gerrit.wikimedia.org/r/1279483

searchsatisfaction — ~2.3M files, 6,426 GB total, actively written, data goes back to 2021. Retention was explicitly requested in T274607 for analytics use.

DROPs at P91991.

And a single hdfs dfs -rm:

hdfs dfs -rm -r /wmf/data/event_sanitized/searchsatisfaction

All ran successfully.

Change #1279483 merged by Xcollazo:

[analytics/refinery@master] Remove SearchSatisfaction from sanitization analytics allowlist

https://gerrit.wikimedia.org/r/1279483

All cleanup work completed. In total, this task removed approximately 15M files and ~13.5 TB of data from event_sanitized:

  • ~10M files / ~4.5 TB from orphaned datasets (schemas previously removed from the allowlist but never deleted from HDFS)
  • ~5M files / ~9 TB from datasets still in the allowlist that were no longer being written to

Retention policy for netflow (the remaining top offender) is being tracked separately in T424904.