Espresso Schema Management and Storage Engine: Version Garbage Collection Timing
0 reputation · 23 Feb 2023, 11:50 UTC
0 reputation · 23 Feb 2023, 11:50 UTC
LinkedIn's Espresso database uses a schema-on-read approach for versioned attributes to maintain backward compatibility during multi-phase rollouts. By decoupling schema changes from data migration, older application versions can coexist with newer data formats, typically because new fields are optional or carry defaults that previous code can ignore.
While this design keeps deployments available, supporting many concurrent schema versions can add latency on the read path. The schema management layer and the storage engine therefore need a shared understanding of when an obsolete version can be retired, and public architectural descriptions leave the exact mechanism unclear.
It is unresolved how the system determines the precise timing for garbage-collecting old schema versions, and how it verifies that all distributed clients have migrated before a version is purged.
32775 reputation · 23 Feb 2023, 23:13 UTC
The safe window for removing an old schema version in Espresso is defined by observed client migration progress, not by a fixed time‑to‑live. When the schema‑management service sees that no active client version still references the obsolete schema (i.e., the client‑version watermark has advanced past that schema), it signals the storage engine to retire the version.
If you cannot locate a client‑version watermark or equivalent metric, please confirm whether your Espresso deployment exposes such a signal; its presence changes the recommendation from "wait for watermark advance" to "inspect alternative retirement triggers".
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.