Skip to content

[spark] Support remove_orphan_blobs procedure. - #9812

Open
Stephen0421 wants to merge 1 commit into
apache:masterfrom
Stephen0421:support-clean-orphan-blob-spark
Open

Stephen0421 wants to merge 1 commit into
apache:masterfrom
Stephen0421:support-clean-orphan-blob-spark

Conversation

@Stephen0421

Copy link
Copy Markdown
Contributor

Purpose

Stacked on #9609. Adds Spark CALL sys.remove_orphan_blobs for unreferenced primary-key .managed.blob packs.

  • local reuses LocalManagedBlobOrphanFilesClean.executeDatabase
  • distributed runs a Spark DAG on the same used-pack / sidecar scan as Core (emitUsedPacks, pack identity, SKIP_MANAGED_BLOB_GC)
  • Abort if topology or the used-pack set changes; persist mark caches and keep abort keys in the deletion DAG so Spark cache recomputation cannot drop a live pack
  • database.* is one Spark job per table (serial + unpersist), not a union of every table, so abort gates stay per-table
  • parallelism is validated before mode dispatch; docs describe per-mode concurrency (distributed stays within the per-table value, local may exceed it when several tables run at once)

Tests

  • local / distributed: delete unreferenced packs, dry-run, skip GC when sidecar is missing
  • database.* for both modes
  • reject non-positive parallelism
  • distributed abort / cache-recompute / used-set freeze / sidecar identity

Stacked on the core local managed blob cleaner. Adds Spark
local/distributed cleanup and procedure coverage, with parallelism
validated before mode dispatch and tests for dry-run plus
database-wide local/distributed cleanup.
@Stephen0421
Stephen0421 force-pushed the support-clean-orphan-blob-spark branch from c5e4bd3 to 20b75be Compare September 14, 2026 10:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant