ExStorageService.Storage.Migration (ex_storage_service v0.6.3)

Copy Markdown View Source

One-shot migration of legacy bucket-local content files ({data_root}/{bucket}/objects/...) into the global CAS ({data_root}/cas/objects/sha256/...).

Physical files only: object metadata (obj:*, obj_ver:*) is not rewritten in Phase 1 (see docs/prd/git-style-data-model.md §19–20). Run in maintenance mode (no concurrent writes). Idempotent: re-running counts already-migrated blobs under :already_global.

Summary

Functions

Migrates every content hash referenced by obj:* / obj_ver:* metadata. Returns {:ok, report} with :migrated, :already_global, and :missing (list of {bucket, hash} whose content exists in neither layout — repair-worker input).

Functions

migrate_to_global_cas()

Migrates every content hash referenced by obj:* / obj_ver:* metadata. Returns {:ok, report} with :migrated, :already_global, and :missing (list of {bucket, hash} whose content exists in neither layout — repair-worker input).