openhouse icon indicating copy to clipboard operation
openhouse copied to clipboard

(wip | no review) InHouse Replication

Open mkuchenbecker opened this issue 6 months ago • 0 comments

(WIP — do not review)

InHouse Replication — a PoC for replacing GaaS (Gobblin-as-a-Service) carbon-copy replication with a plain Spark Scala function that runs inside our own house: an eager, full-history (retention-bounded), physical copy of an OpenHouse table to a renamed destination, committed through the normal OpenHouse catalog path, with snapshot-based recovery.

This is exploratory work in an isolated worktree; it is not for review or merge yet.

What's here

  • replication-poc/{PLAN,CHECKLIST,NOTES}.md — decision trail, phased plan (P0–P2), iteration loop, oracle.
  • infra/recipes/docker-compose/oh-hadoop-spark/:
    • replicate.scala — the replication function + an in-script P0/P1/P2 scenario and a time-travel oracle.
    • run_replicate.sh, seed_sources.scala — harness (spark-shell -i against the local openhouse catalog).
    • docker-compose.yml — mounts the recipe dir into spark-master so the scala iterates live.

Approach (decided; rationale in the docs)

  • Eager physical copy → self-contained replica; serves DR / read-locality / HA from one mechanism.
  • Full history, retention-bounded (floor = full materialization, then per-snapshot deltas) for point-in-time recovery against corruption-between-runs.
  • No file/UUID/snapshot-ID identity: copy files to new dest paths, relocate via Iceberg API carrying source metrics (no re-stat), stamp source-snapshot-id in each dest snapshot summary (recovery index + reconcile).

Status (validated against local Dockerized OpenHouse)

  • ✅ Gate: OH accepts a catalog commit referencing files we placed (relocated DataFile, carried metrics).
  • ✅ P0 full-history replication; oracle dest AS OF i == src AS OF i at every snapshot.
  • ✅ P1 idempotent re-run (no-op) + incremental (only-new replays).
  • ✅ P2 copy-on-write delete / overwrite / compaction (OH default delete mode is CoW here).
  • ⬜ Remaining: P2 MOR positional deletes (force merge-on-read; rewrite delete-file internal paths) + equality deletes + schema/partition-spec evolution; P1 resume-after-partial-copy.

Background: GaaS analysis in ~/code/docs/gaas-analysis/ (out-of-repo).

🤖 Generated with Claude Code

mkuchenbecker avatar Jun 01 '26 23:06 mkuchenbecker