ExStorageService.Storage.Packer (ex_storage_service v0.6.3)

Copy Markdown View Source

Cold-storage policy for the global CAS (PRD §20 Phase 6).

Periodically consolidates loose, reachable blobs whose files have not been modified for :pack_cold_after seconds into pack files via Storage.Pack. Unreachable blobs are left for CasGC. The policy is a global age threshold; per-bucket S3 lifecycle Transition rules are a recorded follow-up.

Configuration (app env, overridable per pack_now/1 call):

  • :packer_interval — sweep interval ms (default 6 h)
  • :pack_cold_after — seconds since last modification (default 30 days)
  • :pack_min_blobs — skip packing below this count (default 100)
  • :pack_max_blobs / :pack_max_bytes — per-pack limits (default 1000 / 1 GiB)
  • :pack_loose_cleanup_after — seconds to retain loose fallbacks after packing (default 24 hours)

Summary

Functions

Returns a specification to start this module under a supervisor.

Run one packing pass now. See moduledoc for options.

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

pack_now(opts \\ [])

Run one packing pass now. See moduledoc for options.

pack_now(server, opts)

start_link(opts \\ [])