Unit 12 of 15 · about 4 hours · explain, implement

Deletion propagation, lineage, provenance and reproducible backfills

Retention tables are promises; propagation keeps them. A delete that stops at the primary while caches, indexes and backfill outputs keep serving the data is erasure theater.

You'll be able to

  • Propagate deletion past tombstones, caches and derived copies with version watermarks and a durable deletion ledger.
  • Record lineage from raw source to derived artifact so every copy is reachable from its origin.
  • Rerun backfills deterministically from pinned inputs, code, configuration, dependencies and randomness.

Covers

Deletion propagation and tombstonesLineage, provenance and reproducible backfills
1

Read

In this order, only the parts listed

0 of 1 done

  1. Erasure and lineage: crypto-shredding, audit, consentHLD Handbook - Reliability, Operations and Security at Scale

    Right-to-erasure and crypto-shredding; Audit, lineage, and consent

    Read for the erasure mechanisms and lineage requirements. Classification and residency topologies belong to the previous unit.

2

Focus on

  • The Classical ML unit on snapshots, lineage, pipeline serialization and serving parity kept immutable snapshots with per-row lineage, and the LLM Foundations unit on provenance, deduplication and contamination kept raw identity apart from normalized identity. Here the new work is applying both to deletion.
  • The exercise's cache watermark rejects stale fills at or below the invalidation version, but a newer fill may be accepted. Subject erasure also needs a durable deletion ledger or generation fence that backfills and restores check.
  • Equal-version puts are idempotent and newer versions must clear the watermark. Allow recreating an erased subject only under an explicit authorization policy, and test a stale source that republishes erased data with a fresh version.
  • Pin the input snapshot, code, configuration, dependency versions and any randomness or time inputs, and use deterministic ordering. Two reruns must agree under a declared equality policy; if floating-point reductions vary, state and justify a tolerance.
Common mistakes · 3
  • Expiring the key and resetting its version history. The versioned store keeps version history across expiry and deletion, so a recreated key never reuses an old version number.
  • Invalidating without a watermark. An event that only removes the cached entry lets an older delayed fill put the data back; the watermark is what makes invalidation idempotent.
  • Backfilling from live sources. New arrivals during the rerun change the input; snapshot first, then compute.
3

Try it yourself

Closed-book, before checking anything

Without notes, trace a delete from primary through cache watermark to a backfill output, and state the read result when a delayed put at version 6 meets a tombstone watermark at 8.
4

Quiz yourself

Answer first, then mark it. Missed ones go to Review.

0 got · 0 missed

  1. 1.A key holds version 5 with watermark 4, and a delayed fill for version 5 arrives. Accept or reject?Answer

    Accept as idempotent: it equals the cached version and sits above the watermark. A fill at version 4 or below would be rejected.

  2. 2.An invalidation event at version 5 removes the entry, then a delayed put at version 6 arrives. What happens?Answer

    The cache accepts it as the new live value, since version 6 exceeds the watermark of 5, and a delayed put at version 5 would be rejected. If the event was a subject erasure, the deletion ledger must also reject the fresh fill.

  3. 3.A key expires and is recreated. May it reuse version 1?Answer

    No. Expiration and deletion remove the live entry but keep version history, so the recreated key advances to the next unused version.

  4. 4.Two backfills of the same date range disagree. What is the first thing to compare?Answer

    Input snapshot identity and code version. Different inputs or different code explain different outputs before any logic bug is suspected.

5

Practice

  • AlgoMaster: Apply Versioned Invalidation Events

    Per-key invalidation watermarks with stale-event rejection; the page tests that delayed and duplicate events cannot resurrect invalidated data

    Then propagate a loglab delete through your own cache watermark. The section mini-project covers this: reproducible backfills from fixed snapshots.

  • AlgoMaster: Build a Versioned TTL Key-Value Store

    Expiry at exactly now + ttl with monotonic versions across expiry and deletion; compareAndSet and remove act only on live matching versions

You're done when

Your delete trace names every copy it touches, watermarked invalidation passes the delayed-fill cases, a fresh-version republish of an erased subject is rejected, and two backfills from pinned inputs agree under your declared equality policy.

Only when you can do this without notes.

Leads to

Notes

Resources · 1 for this unit, 16 more in the section
  • HLD Handbook - Reliability, Operations and Security at ScaleHLD Handbook · primary

    Read Part 6 observability, SLOs, resilience, overload, deployments, chaos, incidents and health, then Part 7 authentication, mTLS, secrets, tenancy and data governance chapters relevant to the capstone. Skip unrelated case studies.

Also in this section

  • DDIA 2e - Chapters 2, 5 and 14Martin Kleppmann and Chris Riccomini · support

    Use Chapter 2 "Describing Performance" for percentile and response-time vocabulary and Chapter 5 for compatibility during rolling upgrades. Chapter 14 is about predictive analytics, privacy and data governance, not operations: read its "Privacy and Tracking" section for the retention and deletion units.

  • Google SRE Books - SLOs, Monitoring, Overload, Cascades, Incidents and RecoveryGoogle · required

    Read SRE Chapter 4 (service level objectives), 6 (monitoring distributed systems), 21 (handling overload), 22 (addressing cascading failures), 14 (managing incidents) and 15 (postmortem culture); Workbook Chapter 2 (implementing SLOs) and 5 (alerting on SLOs); and Building Secure and Reliable Systems Chapter 5 (least privilege) and 9 (design for recovery). Convert each into one alert, limit, load test or runbook action in the capstone.

  • Metastable Failures in Distributed Systems (Bronson et al., 2021)HotOS · support

    Read the trigger and sustaining-effect model of metastable failure and the retry and shedding design prompts. Its model illustrates; it does not predict.

  • Metastable Failures in the Wild (Huang et al., 2022)USENIX OSDI · support

    Read the incident study for how retries and load sustain outages after the trigger ends; it is a sample of public reports, not a rate.

  • Simple Testing Can Prevent Most Critical Failures (Yuan et al., 2014)USENIX OSDI · support

    Read the findings on error-handling code and how few nodes and events reproduce most failures, as the case for testing error paths in your campaign. Its bounds come from one sample of 2014 systems.

  • Gray Failure: The Achilles' Heel of Cloud-Scale Systems (Huang et al., 2017)Microsoft Research · support

    Read the gray-failure model (differential observability between a detector and its clients) as vocabulary for telemetry and failure detection.

  • The Internals of PostgreSQL - Base Backup and Point-in-Time RecoveryHironobu Suzuki · support

    Read Chapter 10 (base backup, how PITR replays WAL, timelines and incremental backup) as the real-engine model for backup integrity, recovery points and restore verification. Note the date you read it.

  • Building Distributed Systems - The Tracer, The Securitor and The MigratorBuild Distributed Systems · optional

    Only the first three tasks of each track are free: in The Tracer, trace-context propagation, span lifecycle and a collector; in The Securitor, JWTs, the OAuth 2 code flow with PKCE and sessions; in The Migrator, schema migrations, expand and contract, and zero-downtime change. Tasks are graded in the browser after login, so treat a pass as a drill and keep your local harness as the evidence.

  • SPIFFE Workload Identity and Workload APISPIFFE Project · support

    Read the SPIFFE ID, X.509-SVID and trust bundle specifications and the Workload API (FetchX509SVID, FetchX509Bundles) to design service identity, short-lived credentials and bundle rotation. A local mock is sufficient unless a real SPIRE deployment answers a specific gap.

  • OpenTelemetry Signals and Semantic ConventionsOpenTelemetry · support

    Read signals and context propagation (W3C Trace Context traceparent, inject and extract, baggage rules), then the semantic conventions (1.44.0) for the RPC and messaging areas with their stability status. Define bounded attributes for request, node, partition, term and offset identities, and never infer global order from display timestamps.

  • Replicated Log and Stream Processor - Production ContractRoadmap-Final · support

    Add workload identity, tenant checks, audit, SLOs, capacity limits, backup and verified restore, mixed-version migration, rollback and reduced point-in-time ML data paths. Run one compound incident from detection through recovery.

  • OWASP Threat Modeling Cheat SheetOWASP · reference

    Use System Modeling (data-flow diagrams, trust boundaries, stores and processes), Threat Identification (the STRIDE table applied to components, data flows and trust boundaries) and Response and Mitigations to build the unit threat model.

  • Feast Documentation - Point-in-Time Joins and Feature RetrievalFeast · support

    Read Point-in-time joins (entity dataframes, get_historical_features, TTL backward scan, filter_by_created_timestamp) and Feature retrieval (event_timestamp as the inclusive upper bound, get_online_features without timestamps, feature services per model version, materialize refresh). Work the join logic on tiny local tables; do not deploy Feast. Page read 2026-10-15 (v0.66-branch documentation).

  • MLflow Model Registry DocsMLflow · support

    Read the Model Registry page (registered models, versions, lineage to the producing run, aliases such as @champion, and tags) and the registry tutorial promotion flow. Stages are deprecated since MLflow 2.9; use aliases and tags. Page read 2026-10-15; the versioned docs move, so re-pin the version you read.

  • DVC Docs - Data VersioningDVC · support

    Read dvc add (Description and Example: Single file) for .dvc content-hash sidecars, the dvc.yaml page with its dvc.lock file section for pipeline state, and push and pull for transfer. A local directory remote is enough; do not set up cloud storage. Page read 2026-10-15.

  • PostgreSQL 18 Documentation - Recovery Targets, Backup Verification and RewindPostgreSQL Global Development Group · reference

    Read Section 19.5.6 Recovery Target, the pg_verifybackup reference and the pg_rewind reference for recovery stopping points, manifest checks and rejoining a diverged primary.