Ferricstore.Merge.Supervisor (ferricstore v0.3.4)

Copy Markdown View Source

Supervises the merge subsystem: one Semaphore and N Scheduler processes.

The supervision tree is:

Ferricstore.Merge.Supervisor (:one_for_one)
 Ferricstore.Merge.Semaphore       (node-level, capacity 1)
 Ferricstore.Merge.Scheduler.0     (per-shard)
 Ferricstore.Merge.Scheduler.1
 Ferricstore.Merge.Scheduler.2
 Ferricstore.Merge.Scheduler.3

The Semaphore must start before any Scheduler so that schedulers can acquire it immediately on their first check.

Options

  • :data_dir (required) -- base directory for Bitcask data files
  • :shard_count -- number of shards (default: 4)
  • :merge_config -- per-scheduler merge configuration override (map)

Summary

Functions

Returns a specification to start this module under a supervisor.

Starts the merge supervisor and all children.

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

start_link(opts)

@spec start_link(keyword()) :: Supervisor.on_start()

Starts the merge supervisor and all children.